You need to sign in to do that
Don't have an account?
Baz Denson
return to record on lightning component close
I have built a component to override the new action on my Previous_address__c object which is a master detail relationship to the Account object.
When I hit save or cancel, the comonent stays open. I would like it to return to the account record I clicked 'new previous address' on.
Can anyone give me some pointers?
TIA
When I hit save or cancel, the comonent stays open. I would like it to return to the account record I clicked 'new previous address' on.
Can anyone give me some pointers?
TIA
Greetings to you!
You need to use force:navigateToSObject, this event enables you to navigate to an sObject record specified by recordId.
Please refer to the below links which might help you further with the above requirement.
https://andyinthecloud.com/2017/05/30/overriding-standard-actions-with-lightning-components/
https://trailhead.salesforce.com/en/content/learn/projects/workshop-override-standard-action/override_4
Please note, Salesforce recommends using lightning:navigation component with the standard__recordPage page type instead of force:navigateToSObject.
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
All Answers
Greetings to you!
You need to use force:navigateToSObject, this event enables you to navigate to an sObject record specified by recordId.
Please refer to the below links which might help you further with the above requirement.
https://andyinthecloud.com/2017/05/30/overriding-standard-actions-with-lightning-components/
https://trailhead.salesforce.com/en/content/learn/projects/workshop-override-standard-action/override_4
Please note, Salesforce recommends using lightning:navigation component with the standard__recordPage page type instead of force:navigateToSObject.
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
Before the navigation above, you can force the close of the action panel.
https://developer.salesforce.com/docs/component-library/bundle/force:closeQuickAction/documentation (https://developer.salesforce.com/docs/component-library/bundle/force:closeQuickAction/documentation)