- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2022 01:20 AM
Need to write business rule where worknotes contains "My Laptop Issue" then only it should assigned to specific assignment group.
I have written br its not working.Please guide me in this.
var gr = new GlideRecord('sc_task');
gr.query();
if (current.work_notes == 'My Laptop Issue') { gr.update();
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2022 04:14 AM
Hi,
update your script as this
(function executeRule(current, previous /*null when async*/) {
// Add your code here
if (current.work_notes.getJournalEntry(1).indexOf('My Laptop Issue') > -1 ) {
current.assignment_group = "groupSysId"; // give group sysId here
}
})(current, previous);
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-06-2022 01:25 AM
Hi,
Can you please share which BR you created and which table?
When task should be assigned to user? On insert/update?
Thanks,
Anil Lande
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2022 02:17 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2022 01:40 AM
Hey,
Why don't you use this in Before - Update BR condition, where:
Work notes - Changes AND Work notes - Contain - "My Laptop issue"
and in set field values section you can set the assignment group field.
Feel free to mark correct, If I answered your query.
Will be helpful for future visitors looking for similar questions 🙂
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2022 02:17 AM