- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2022 09:06 AM
Hello Everyone,
I have an Requirement in Agent Workspace. we would like for the interaction to be automatically closed when it gets attached to a TASK, INC or RITM.
Thanks in advance.
Rajesh B.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2022 09:23 AM
Hi Rajesh,
Create a new BR on the 'interaction_related_record' record with the table conditions if you want or simply a BR with the following script will close interaction as soon as a record is created from the interaction. (you have mentioned TASK Table, incident and Requested item table would be extended from TASK so the below BR without any condition should work for you)
(function executeRule(current, previous /*null when async*/ ) {
var closeInteractionRec = new GlideRecord('interaction');
closeInteractionRec.get(current.interaction.sys_id);
closeInteractionRec.state = 'closed_complete';
closeInteractionRec.update();
})(current, previous);
Thanks
-Harneet Sital (ServiceNow Certified Technical Architect)
Request you to please mark my answer as helpful or correct based on the impact
Find all my ServiceNow articles here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2022 01:01 AM
Thank you
it's working as expected. Once again Thank you!