+ Start a Discussion

e.force.EditRecord causing a loop

I have two lightning components. One for create new record and other one for edit record. I am overriding the standard new and edit actions with these components. 

The new action is working fine and user is getting redirected to CreateComponent which is firing standard e.force:CreateRecord event and the form shows up correctly.

However when I am trying to edit the record it is being redirected to EditComponent but then the browser hangs. On debugging I found that it is causing an infinite loop because of the standard e.force:EditRecord event being called in js controller for the component which seems to be logically correct.

But my question is why it is not behaving the same for CreateComponent. What is the difference between the two? or Am I missing something here?
Hao Huang 8Hao Huang 8
Hi Sachin,

I am facing the same issue, have you found a solution yet ?