- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2024 09:33 PM
I have written a BR on change task table to update the worknotes when incident created . its updating the worknotes only when I use current.update(). as current.update is not used in BR so I removed and try to give like this but the worknotes of ctask is not updating.
How to update the worknotes ithout using current.update() in the BR?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2024 10:21 PM - edited 01-02-2024 10:28 PM
Hi @mounika32
Let's try to change your Business Rules as following
1. When to run
Before update
Conditions: Work notes changes
2. Advanced
(function executeRule(current, previous /*null when async*/ ) {
//insert new Incident [inc]
var inc = new GlideRecord('incident');
inc.initialize();
inc.urgency = 2;
//etc
inc.insert();
current.assigned_to = '';
current.state = 1;
//etc
//set comments
current.comments = 'Incident ' + inc.number + ' has been raised to handle this task since automation failed.';
//remove update();
})(current, previous);
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2024 10:45 PM
@Tai Vu , its working now thanks for your help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2024 03:02 AM
@Tai Vu Hi Tim, Hope you are doing well,
Same issue for me as well, But my case I need to update worknotes and activities once CI(configuration Item) got generated on Change_Task form.
For this I have not created any BR but using existing worknotes update function on Create equipment record producer, which uses script include. Its OOB function.. sometime it works but for some instances it will not update.
please advise, do I need to create BR for this?