Important Update: Community URLs redirect issues are partially resolved. Learn More. .
2020-07-24 04:23 AM
Hi,
I'm trying to create a custom button to Save the record first, and then navigate to a dashboard.
For another button, saving the record first and then add a new cross reference record.
But upon the Save, page reloads and the second action is not taking place if given along with Save. Individually it works fine. Is it possible to perform another action after Save / perform the save without reload of page?
This is the code I'm trying to use:
$('#SaveDraft').click(function(){
$('#master_btnApply').click();
$nf('../foundation/WorkspaceDashboard.aspx?workspaceId=112&dashboardId=292');
});
$('#SaveAdd').click(function(){
$('#master_btnApply').click();
$pb('#master_DefaultContent_rts_s5807_Add_New')[0].click();
});
2020-08-11 04:06 PM
Kranti, the issue is that when a record is saved the page is refreshed and so is the custom object code.
You'd have to implement something that would set a session storage variable (Window sessionStorage Property) and upon the record "reloading" check for that variable, clear it and proceed with what you want to do next.
Advisory Consultant
2020-08-11 11:30 PM
Thanks for the idea David! Will try and see if this works