- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2023 04:08 AM
Hi,
Im trying to add info Message using onLoad client script. this is the desired message:
Hi, a change has been made CHG004007, please be aware.
When the user click on the change number he needs to be redirected to the change.
How can I achieve that?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2023 05:07 AM
You'll need the Script Include to send the Change Number and the sys_id. You can concatenate the message like this:
var msg = "Hi, a change has been made <a href='https://dev11.service-now.com/now/nav/ui/classic/params/target/change_request.do%3Fsys_id%3D" + returneddata.sysid + " ' target='_blank'><strong>" + returneddata.number + "</strong>, please be aware</a>."
g_form.addInfoMessage(msg);
This post guides you through returning more than one value, if you haven't done this yet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2023 04:33 AM
Hi Alon,
For this static message, you would use something like this:
g_form.addInfoMessage("Hi, a change has been made <a href='https://dev11.service-now.com/now/nav/ui/classic/params/target/change_request.do%3Fsys_id%3D9acdf552db252200a6a2b31be0b8f507' target='_blank'><strong>CHG004007</strong>, please be aware</a>.");
replacing dev11 with your instance name, and the sys_id of your intended change request following sys_id%3D
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2023 04:36 AM
@Brad Bowman hi thanks for the response. how can I make 'CHG004007' to be dynamic. basically im Im calling a script include that sending back the Change number. how can I insert the change number dynmically into the href link
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2023 05:07 AM
You'll need the Script Include to send the Change Number and the sys_id. You can concatenate the message like this:
var msg = "Hi, a change has been made <a href='https://dev11.service-now.com/now/nav/ui/classic/params/target/change_request.do%3Fsys_id%3D" + returneddata.sysid + " ' target='_blank'><strong>" + returneddata.number + "</strong>, please be aware</a>."
g_form.addInfoMessage(msg);
This post guides you through returning more than one value, if you haven't done this yet.