Important Update: Some Community URL Redirects are Under Maintenance. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

"Saved successfully"

MarcioJunior
Contributor III

How can I create a custom object with a message in "Saved successfully". after the record has been saved?

3 REPLIES 3

Ilya_Khen
Champion III

You would probably need to use HTML5 session storage for it, because once post save function is used, you cannot control record in Custom Object anymore.

HTML5 Web Storage 

jsol5
Advocate II

There may be some variable in the session that you can use, but off-hand, I don't know what it is.

 

I believe what you'd need to do, assuming you can't find what Archer's already doing, is create a session variable when the master save button is clicked.

 

When the record is saved, the record refreshes.  So, the way to persist some data in a browser is to use a session variable that, on reload, the browser would see it and "do something."

 

Using javascript/jquery, you can add to the save button's click event and then on load, check for that variable and then show your message.

 

So, might be something like this (i'm sure this isn't 100%) -

Sys.Application.add_load(function() {

 

if(sessionStorage.getItem("Saved")=="true"){
//clear storage
sessionStorage.removeItem("Saved");

 

//show message

var msg = "Sucessfully Saved";
var title = 'Success!';
WarningAlert(msg,'',title);

}

 

 $('#master_btnApply').attr('href',"#").removeAttr("onclick").unbind("click").click(function(){

 sessionStorage.setItem("Saved","true"); 

  ShowAnimationAndPostback('master$btnApply');

});

});

jsol5
Advocate II

Curious if you got it to work.