How to display an Info message in ServiceNow Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2021 07:08 AM
Hi,
How to display an info message for the service Now Portal when the incident form resolved state changes to the closed state.
Regards,
Priya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2021 01:46 PM
Hi,
Can you confirm, do you want to display an info message when the user change the resolved to closed - if yes above business rule should work.
Or if you want to display the info message for already closed incidents - Create an onLoad client script and set the UI type as Mobile/service portal.
function onLoad() {
//Type appropriate comment here, and begin script below
if (g_form.getValue('state') == 7) { // set the correct closed state value
g_form.addInfoMessage('The incident state is already closed');
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2021 10:51 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2021 10:53 PM
Hi,
did you check the state field is present on form
try this
if(g_form.getValue('state').toString() == '7'){
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2021 10:57 PM
Hi,
I have tried, It's not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2021 11:21 PM
Hi,
which form/page you are checking this?
Did you check the onLoad is running? try adding alert and check
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader