+ Start a Discussion

force:recordEdit is not working and throwing the below error. "Access Check Failed! Component.getEvent():'recordSave' of component 'markup://force:recordEdit {1145:0} {edit}' is not visible to 'markup://c:CW_ActivationPlanningList {376:401;a}'."

I am getting below error message whenever I try to edit and save record of custom object called ‘ Connection Point.
I have used ‘ force:recordEdit ‘ event for editing and saving the record.

User-added image

CW_ActivationPlanningList component.

User-added image

Edit modal after clicking on ‘Edit’ button from the above component.

User-added image

After clickion on save , below error message is coming
Access Check Failed! Component.getEvent():'recordSave' of component 'markup://force:recordEdit {1145:0} {edit}' is not visible to 'markup://c:CW_ActivationPlanningList {376:401;a}'.

Technical Details:
I  have defined  force:recordSave and force:recordEdit using aura:dependency inside the source component.

User-added image

Portion of code where I am opening the Modal using ‘ force:recordEdit ‘ event.  
User-added image

“editConnectionPoint” method will get called whenever  we click on Edit button from source component.
“saveEditedRecord”  method will get called after clicking on save method.
editConnectionPoint : function(component, event, helper) {
        var cpId = event.target.id;
        console.log('Inside Edit button click -cpId ' +cpId);
    navigateToCpDetail : function (component, event, helper) {
        var cpId = event.target.id;
        var navEvt = $A.get("e.force:navigateToSObject");
            "recordId": cpId,
            "slideDevName": "related"
    //To Save Record From Standard Edit page as modal
    saveEditedRecord : function(component, event, helper) {    
        console.log('getEvent-element' +component.find("edit"));
        console.log('inside after clicking on save button' +component.find("edit").get("e.recordSave"));
        if(component.find("edit").get("e.recordSave") !== null){        

 //To confirm edited record is saved and to refresh list
    afterSaveForceEdit : function(component, event, helper) {
        console.log('inside after successful save');
        var toastEvent = $A.get("e.force:showToast");
            "title": "Success!",
            "message": "The record has been updated successfully.",
  Note: This issus is not consistent, sometimes it's working and sometime throwing the given error. Any help would be greatly appreciated.

Hi Sattibabu,
           i think here is the problem with aura:if , your <force:recordEdit> component use in aura:if part, and bydefault you have make it fase on line number 17 [aura:attribute] , try once make it true bydefault and check again.
<aura:if isTrue="false"> means tags inside aura:if have not created until it will be true 
Hopes it helps 
Hi Piyush .. Thanks for update, i have tried your approach , but no luck. I put <aura:if>  intentionally to control the behavior of <force:recordEdit> modal pop-up.  I want to display that modal whenever i click on 'Edit' button of my source component.  If i made it true by default , force:recordEdit modal will open automatically on initialization of source component.  Interesting this is that it's working when you open source component first time, but if you reload the sournce component and click on 'Edit' button then getting this error. 

Hope below error indicating that  force:recordEdit component is not visible to source component called ' CW_ActivationPlanningList'.
Access Check Failed! Component.getEvent():'recordSave' of component 'markup://force:recordEdit {1168:0} {edit}' is not visible to 'markup://c:CW_ActivationPlanningList {376:419;a}'.
I have used aura:dependency tags inside my source component to make it visible, however it's not working.
<aura:dependency resource="markup://force:recordSave" type="EVENT"/>
 <aura:dependency resource="markup://force:recordEdit" type="COMPONENT"/>
I am not sure is there any other way to make force:recordEdit component visible to source component. 
FTrailhead LTrailheaFTrailhead LTrailhea
Seems cache issue. In `Security -> Session Settings` try to uncheck `Enable secure and persistent browser caching to improve performance`.