Automatic activity work notes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2024 04:31 AM
I'm trying to figure out how to add work notes in the activity field when a catalog task has been started from a work flow and assigned to a different assignment group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2024 06:10 AM
Hi,
Try below:
Create a Business Rule or Workflow:
- Business Rule: You can create an "onAfter" business rule on the catalog task table. This rule will trigger after the record has been inserted or updated.
- Workflow: Alternatively, you can use a workflow with appropriate activities to achieve the same result.
Define the Trigger Conditions:
- Specify the conditions under which you want the work notes to be added. This might include criteria such as the assignment group being changed or the task being started.
Add Script to Update Work Notes:
- In the business rule script or workflow activity script, use the ServiceNow GlideRecord API to update the 'work_notes' field in the activity stream.
- Here's an example of a business rule script:
(function executeRule(current, previous /*null when async*/){ if (current.assignment_group.changes() || current.active.changes()){ // Check if assignment group or active status has changedvar workNotes = "Catalog task started. Additional information here.";current.work_notes = workNotes;current.update();} })(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2024 06:11 AM
Any reason you are not able to add the assignment group field on the catalog form like below:
In case you want to add custom work notes, you can write a business rule.
current.work_notes = "Assignment Group has Changed";
Please accept the solution if it solved your query or please mark helpful if this helped.
Thanks,