- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2022 10:09 AM
Hello everyone
I am using below script to copy additional comments from catalog task to requested item.
(function executeRule(current, previous /*null when async*/) {
var compare,task_comment2,task_comment,ritm_comment2,ritm_comment;
task_comment =current.comments.getJournalEntry(1);
var ritm_gr = new GlideRecord('sc_req_item');
ritm_gr.addQuery('sys_id', current.parent);
ritm_gr.query();
if(ritm_gr.next())
{
ritm_comment =ritm_gr.comments.getJournalEntry(1);
compare = task_comment2.indexOf(ritm_comment2);
if(compare == -1)
{
ritm_gr.comments = task_comment2.trim();
ritm_gr.update();
}
}
})(current, previous);
The problem is 'This script is executing as expected but It is copying timestamp also'
I don't want timestamp to copy from catalog task to request item form.
Please help me to achieve this.
Thank you
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2022 10:15 AM
Hello Jay
Remove User info and timestamp from commets - Developer Community - Question - ServiceNow Community
Please follow above link and refer solution from Deepak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2022 10:15 AM
Hello Jay
Remove User info and timestamp from commets - Developer Community - Question - ServiceNow Community
Please follow above link and refer solution from Deepak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2022 10:20 AM
Solution worked
Thank you