display info message after record producer redirect

JJG
Kilo Guru

Hello,

I have a catalog record producer that allows employees to submit PTO. After submit, the record producer redirects them to the portal dashboard. I would like an info message to display after the redirect that says:

'Successfully submitted PTO'

How can I achieve this?

6 REPLIES 6

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi JJG,

Include the below line in the script section of the record producer

gs.addInfoMessage('Successfully submitted PTO');

 

- Pradeep Sharma

I tried that, it doesnt work. It simply erases the message once the redirect is complete.

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

please check below links:

https://community.servicenow.com/community?id=community_question&sys_id=e3d1b0ac1b42ff40d01143f6fe4b...

https://www.servicenowguru.com/scripting/adding-redirect-message-record-producer/

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Allen Andreas
Administrator
Administrator

Hi,

This link gives good detail on what to do, basically it's about creating a very basic custom widget and placing it on the landing page you went them to go to. That is used to fire the infomessage once they get redirected there. Example here: https://community.servicenow.com/community?id=community_question&sys_id=1460bcd9dbc59b0458dcf4621f96...

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!