Displaying a specific message after Record Producer submission (update) in the Service Portal

Wesley Breshear
Tera Expert

Hello,

I am using a catalog form to update a record on the Product table (rm_product).  My form is a Record Producer form so during submit my record producer script uses this command so a new record is not generated. 

current.setAbortAction(true);

But then I get directed to a page that says "No record found.".  This would seem expected but very confusing to the user updating the record.  I have been able to redirect the user from the page that says "No record found." by using this command.

producer.portal_redirect = 'https://' + instanceName + '.service-now.com/sp?id=sc_cat_item&sys_id=686a62521bb9b7002240a79b2d4bcb88';

However, I am still struggling in getting a message or confirmation box to appear to the user telling he/her "The Product record has been updated."  gs.addInfoMessage("Record is updated."); is not working in the Service Portal and I have seen some articles talking about using spUtil.addInfoMessage("Your message"); but adding it to the catalog form widget which I don't think that I can do because the widget is used for all forms and I don't want this message appearing during other submissions.  I am not aware of how to have a specific widget or instance be used for a specific record producer form if so that might be a solution. 

Any other ideas?

Thank you,

-Wesley

8 REPLIES 8

Yogi3
Kilo Guru

See below link if it helps.

 

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

 

Note: Please mark helpful, if it helps.

Yep, looked at this one and it will work in the CMS (native) catalog for submission but not with Service Portal.

Yes Yogi,

Saw this article too, but as I said in my post I think this would be a message within the Widget so it would appear on all catalog items during submission.  I suppose this may work if I created an IF condition to only trigger if it is that specific catalog item.  The disadvantage is that I have to clone and break away from out-of-the-box widget which means that we then always have to watch for new enhancements.   We have been trying to stay with the out-of-the-box widgets from ServiceNow.  So really looking for a solution that doesn't 'customize' our Service Portal.

Thanks for the ideas so far but do have any other ideas?

-Wesley