Quantcast
Channel: Active questions tagged lightning-experience - Salesforce Stack Exchange
Viewing all articles
Browse latest Browse all 3036

Overriding the Cancel button of a force:createrecord lightning component

$
0
0

Created a aura component and have overrided this component with NEW standard button .On click of save, record gets created and redirect happens successfully.The problem is, while clicking the cancel button the page is not redirecting back to the standard list view page.

Below is my sample code. I have also tried all the various ways of destroying the component and redirecting to the list view but have not been sucessfull in redirecting back.

Any suggestions in this regard is highly appreciated.

var createAcountContactEvent = $A.get("e.force:createRecord");                createAcountContactEvent.setParams({"entityApiName": "Pipeline__c",                    recordTypeId: recordTypeId,"navigationLocation":"LOOKUP","panelOnDestroyCallback": function(event) {                        var urlEvent = $A.get("e.force:navigateToURL");                                                       urlEvent.setParams({"url": "/lightning/o/Pipeline__c/home", "isredirect":true                            });                            urlEvent.fire();                    }                });                createAcountContactEvent.fire();

Thank you!!!


Viewing all articles
Browse latest Browse all 3036

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>