2

I have a page listing Cases with an edit button assigned to each one - the edit button fires a standard e.force:editRecord event, passing the recordId per button.

Is there a way I can run a function/action on save of this record in order to refresh/rerun the Case list?

I have looked at the following answers but they do not work. Callback event on $A.get('e.force:editRecord') in lightning

Example code:

This is where I am attempting to handle the events:

<aura:handler name="handleEdit" event="force:editRecord" action="{!c.fetchCaseRows}" />
<aura:handler name="handleSaveSuccess" event="force:recordSaveSuccess" action="{!c.fetchCaseRows}" />

This is where I call the save:

updateCase: function(component, event, helper) {
    var editRecordEvent = $A.get("e.force:editRecord");
    editRecordEvent.setParams({
        "recordId": event.currentTarget.id
    });
    editRecordEvent.fire();
},
10
  • is this component part of a vf page/ record detail page in lightning /lightning tab ?
    – Rao
    Aug 10, 2017 at 21:56
  • This is a Lightning Component/Tab. Aug 11, 2017 at 8:11
  • can you post your code to see how you are trying to call the refresh event/savesuccess event if you tried that route
    – Rao
    Aug 11, 2017 at 16:33
  • I have updated the original post. Neither event fires. Aug 21, 2017 at 10:50
  • is this a copy paste error? your events are calling fetchcaseRows from the client side controller and all I see in the client side is updateCase function?
    – Rao
    Aug 21, 2017 at 16:13

0

You must log in to answer this question.