I have a "Create Record" button on a Lightning list view. It creates the record in the custom object when the user hits Save and then puts the user on a view of the newly created record. Instead of this, I would like the user returned to the List View where the button was called. We have Salesforce Professional.
-
what kind of button it is? Can you add more details about the button you have?– sanket kumarCommented Nov 11, 2020 at 9:01
-
The button was created by going to my custom object in Lightning and selecting Buttons/Links/Actions. I then chose New Button/Link. I selected List button and gave the button a link, label, description. I selected URL as the button Content Source and "Display in existing window with sidebar." I then added the button to the Classic Search default list view. The URL that I used is the one that comes up when I click New on the custom object's List View.– Michele KleinhomerCommented Nov 11, 2020 at 9:58
Add a comment
|
1 Answer
As per comment, You need the Return URL parameter in button URL. A sample example is below:-
/a06/e?retURL=/001/o
If you are working with Lightning URL Hack, below formula will work. It has backgroundContext that works same as Return URL parameter.
{!URLFOR('/lightning/o/Account/new?count=1&nooverride=1&useRecordTypeCheck=1&navigationLocation=LIST_VIEW&uid=160510799526966038&backgroundContext=/lightning/o/Account/list?filterName=Recent')}
-
Can you clarify how I would modify the following button URL if I want it to create a new record and return to the List View from which I clicked the button? na75.lightning.force.com/lightning/o/DC_Event_Member__c/… Commented Nov 11, 2020 at 12:19
-