5

I am creating custom object records using standard salesforce record creation feature by firing the event force:createRecord from my custom component.

After saving the record, Page navigates to standard record view. But I want to handle the successful case(event) instead and perform reloadData/refreshView on my custom component.

Whereas for Record Edit - "force:recordSaveSuccess" Event is working when using Component force:recordEdit (instead of force:editRecord event). But I could find no such component for Create Record.


Is there any way we can handle successful case (record saved) or override Save or set callback??

createRecord : function (component, event, helper) {
    var createRecordEvent = $A.get("e.force:createRecord");
    createRecordEvent.setParams({
        "entityApiName": "MyCustomObject__c"
    });
    createRecordEvent.fire();
},

Thanks for your time..

1

Unfortunately there is no such event available in force:createRecord

If you want to achieve this you need to create your custom lightning component which will do the similar functionality and then you can handle the behavior.

  • Thanks for the info, Probably I will leave this as is. This is a temporary component and we would like to go with standard feature at this moment, will create custom component when required. – Sriram Jun 29 '17 at 17:40
  • Mark this is as correct answer, if this helped you – Mustafa Jhabuawala Jul 1 '17 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.