1

I have a lightning component on my custom object record page that grabs the Account addresses and places them in a picklist for the user to select which address they want to use for the shipping address. This component is always ready to select, ie either view mode or edit mode it can be selected and saves the record. The problem is if the user is editing the record ie entering Status/SubStatus/general info/etc, then while in edit mode they select an address, it saves the address in the background so when the user clicks Save to save the other edits we see an error that the record was edited already. Is there something I can write in my controller to know if the record is in Edit mode so I can hide the Lightning Component while record is on Edit? I also thought about the Set Component Visibility on the Lightning Page but did not see a viable option for when the record is in Edit mode. Thanks for your help, I hope this makes sense! Ryan

enter image description here

0

Are you using lightning:recordForm? If so, please take a look at this link: Detect lightning:recordForm change in mode attribute.

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.