I am using force:recordEdit in my component to edit the record.

<div class="slds-modal__content slds-p-around--medium">
    <force:recordEdit aura:id="edit" recordId="{!v.recordId}"/>

and then i am using a button to save the record which will fire recordSave event to save my record.

<ui:button class="slds-button slds-button--brand" label="Save" press="{!c.saveRec}"/>   

Here is my controller code:

saveRec : function(component, event, helper){
    //Open modal
    component.set("v.isLoading", true);

    //Save the record

This functionality is working perfectly if i uncheck Enable secure and persistent browser caching to improve performance. But if i select this checkbox, component.find("edit").get("e.recordSave") is returning null. And ultimately the fire() is failing as it is not able to recognize the event.

[Cannot read property 'fire' of null]

What i understood with this checkbox is it adds data caching in the browser to avoid additional call to server for performance improvement. I have deselected this checkbox to avoid mutliple times refresh to reflect the changes during development. :)

Does it mean force:recordEdit uses clientside caching and how it works ? Salesforce doesn't recommend deselecting this checkbox as per this if there is no exception to our client. Can someone help me to understand this concept ?



You must log in to answer this question.