- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2023 09:38 PM
For our integration , we need to send event actions based on if current assignment group changes.
I have written a Async After update BR its not working when I use this below piece of code:
current.assignment_group.changes().
Let us know if anyone has any idea on this asap.
Thank you,
Sowmya
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2023 10:32 PM - edited 02-28-2023 10:35 PM
Hi @Kotha Sowmya,
"current.assignment_group.changes()" would work only in condition builder or condition field and not in script section since async business rule don't have access to previous object.
it works in condition since condition is evaluated instantly hence in the condition changes, changeTo and changesFrom work.
You can switch your BR from "async" to "after" update. If you want it to run at last then you can give order as 1000 or greater.
Then you can use "current.assignment_group.changes()" in the script section.
After that based on the field changed (state or assignment group) you can trigger the event. You can create a script action, which will execute when event is triggered and where you will write the scripts to be executed.
Please mark helpful and accept solution if it helped you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2023 09:43 PM - edited 02-28-2023 09:47 PM
Hi @Kotha Sowmya,
Is there any specific requirement to use "current.assignment_group.changes()" code ?
You can use condition builder on the Business rule to check assignment group change.
Please mark helpful and accept solution if it helped you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2023 10:15 PM
Hello @Abhishek Singh6 ,
We have a requirement to trigger BR whenever a field on incident got changed and we need to send some event actions based on state values and assignment group changes which we are implementing it in the script,that is the reason we are not directly giving in the condition builder.
Thanks,
Sowmya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2023 10:32 PM - edited 02-28-2023 10:35 PM
Hi @Kotha Sowmya,
"current.assignment_group.changes()" would work only in condition builder or condition field and not in script section since async business rule don't have access to previous object.
it works in condition since condition is evaluated instantly hence in the condition changes, changeTo and changesFrom work.
You can switch your BR from "async" to "after" update. If you want it to run at last then you can give order as 1000 or greater.
Then you can use "current.assignment_group.changes()" in the script section.
After that based on the field changed (state or assignment group) you can trigger the event. You can create a script action, which will execute when event is triggered and where you will write the scripts to be executed.
Please mark helpful and accept solution if it helped you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2023 09:07 AM
Thank you Abhishek,It worked when I implement it using script action!