You need to sign in to do that
Don't have an account?
Marketing Marketing 27
how to show success message after VF pages navigates to new record
I've just made a basic wizard composed of two Visualforce pages. On the second page, users create a new opportunity of a specific type. When they click Save, they are taken to the newly created opportunity.
I would like a basic success message to pop up on this page after they are taken to it.
how can I accomplish this? I will make a lightning web component if I have to but I would rather not :)
below is my save method on my controller extension
I would like a basic success message to pop up on this page after they are taken to it.
how can I accomplish this? I will make a lightning web component if I have to but I would rather not :)
below is my save method on my controller extension
public PageReference Save(){ try{ insert TD2nd; TD1st.X504_Related_Opportunity__c = TD2nd.Id; update TD1st; return new Pagereference('/' + TD2nd.Id); } catch(DmlException d){ Apexpages.addMessages(d); return NULL; } }
Check below syntax. Check value from StandardController's save method
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/apex_ApexPages_StandardController_methods.htm
https://www.infallibletechie.com/2018/09/how-to-display-success-message-on.html
Please mark as Best Answer if above information was helpful.
Thanks,