- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2022 02:36 AM
Hello Community,
Actually as per my requirement i need hyperlink in close notes of a task . I have written script for this, but its working for work notes , i need hyperlink in close notes . This script is working fine in work notes , but in close notes i am not gettimng hyperlink . please help me with this.
Script i have written :
var req_for = current.request.requested_for.getDisplayValue();
var url = 'https://conagra.service-now.com/sp?id=sc_cat_item&sys_id=ce75036adbed4950ed38a9c8139619b1&referrer=popular_items';
var linkName = 'link';
var msg = '[code]<a href="' + url + '">' + linkName + '</a>[/code]';
task.close_notes = ' User ' + current.variables.requested_by_zid + ' has been added to ' + current.cat_item.group.getDisplayValue() + ' as requested.Software pushes automatically and user may need to kick off the install if the software is still in the software center. To do this, go to the windows search bar in the bottom left and search for software center. Go to the pending installs tab and initiate the install. If there are still issues, please open a helpdesk ticket for further troubleshooting assistance. '+msg ;
task.work_notes = ' User ' + current.variables.requested_by_zid + ' has been added to ' + current.cat_item.group.getDisplayValue() + ' as requested.Software pushes automatically and user may need to kick off the install if the software is still in the software center. To do this, go to the windows search bar in the bottom left and search for software center. Go to the pending installs tab and initiate the install. If there are still issues, please open a helpdesk ticket for further troubleshooting assistance. '+msg ;
Thanks,
Spandana.
Solved! Go to Solution.
- Labels:
-
IT Fundamentals Dashboard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2022 03:00 AM
Then you need to add a "Wait for Condition" activity with the condition as state change to closed complete and when in "Run Script" activity execute your script after this wait for condition
please mark my answer correct if it helps you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2022 03:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2022 04:07 AM
Is there any update?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2022 04:27 AM
can you try removing the condition in the wait for condition activity and put the script below
answer = false;
var rec = new GlideRecord('sc_req_item');
rec.addQuery('sys_id', current.sys_id);
rec.addQuery('state', 'your closed complete state choice value'); // check if any approval for this RITM is in closed complete state
rec.query();
if(rec.next()){
answer = true;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2022 05:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2022 05:04 AM
the error is visible when you open workflow context by clicking show workflow in RITM can you send the screenshot of it ?