- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2022 04:53 AM
Hi All,
I am facing issue where Background script having setWorkflow(false) isn't updating the worknotes of the incident.
Below is the script,
var inc = new GlideRecord('incident');
if(inc.get('problem_id', <sys_id of the problem which is related with incident>)){
inc.work_notes = 'testing note';
inc.setWorkflow(false);
inc.update();
}
Same script updates the worknotes of the incident if setWorkflow(false) condition is removed.
In both the cases however 'sys_journal_field' tables is inserted with entry but still entry doesnt appear in Incident when setWorkflow(false) condition is used.
What can I do here If I have to update the incident record with setWorkflow(false) condition?
Solved! Go to Solution.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2022 08:55 PM
Thank you for marking my response as helpful.
If my response helped please mark it correct and close the thread so that it benefits future readers.
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
‎07-02-2022 05:28 AM
Hi,
check this KB
there is a workaround in this link; you can use that -> insert record into sys_journal_field via script
Issue with updating work notes when using setWorkFlow()
Also when setWorkflow(false) is used then no audit happens and updates won't be shown in activity log
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
‎07-04-2022 08:55 PM
Thank you for marking my response as helpful.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader