Alert or confirmation message after business rule successful execution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2019 02:56 AM
Hi
I want to display confirmation POPUP message like "Workorder<WO> has been submitted successfully in ServiceNow. Please note Service <ServiceID> for further communication."
What i initially did was to add message in addInfoMessage but this is not what i required. I need message to be displayed in popup message.
Note: <WO> and <ServiceID> are the values coming from server side to be displayed.
How can i achieve this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2019 04:55 AM
Hi,
Are you creating work order and Service ID in another table in BR?. As BR runs on server side, we can't initiate pop-up windows from this. However, you may try below approach.
1. Create an onsubmit script and put the server side script in a script include. Use GlideAjax and getXMLWait
2. In call back function , assign value returned from server side and display it using alert(answer);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2019 05:16 AM
Hi Ronak,
As a BR is a server side script you can use the following piece of line in your BR to throw a message when it got completed.
gs.addInfoMessage("Message Completion");
Thanks,
Sambit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2019 11:50 PM
Hi Ronak,
"Workorder<WO> has been submitted successfully in ServiceNow. Please note Service <ServiceID> for further communication."
To Retrieve this fields from server try below code :
g_scratchpad.WO = current.WO;
g_scratchpad.ServiceID = current.ServiceID;
For Popup try this :
gs.addInfoMessage("Workorder has been submitted successfully in ServiceNow. Please note Service ID for further communication.");