Assignment Rule script based on variables of record producer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2022 07:48 PM
Hello,
I need help. I am trying to write an assignment rule script based on variables of record producer undre table (sn_sm_legal_request).
I tried with below script but failed (nothing happen). Can anyone advise?
var entity = producer.variables.align_entity_of_chop_applicant.
if (entity == 'abc')
current.assignment_group.setDisplayValue("Commercial Legal");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2022 09:24 PM
I tried with this script but doesn't work.
var entity = producer.align_entity_of_chop_applicant;
if (entity == 'abc')
{
current.assignment_group.setDisplayValue("Commercial Legal");
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2022 09:36 PM - edited 10-31-2022 09:37 PM
Can you once check what value is coming in entity. use the below code below:-
var entity = producer.align_entity_of_chop_applicant;
gs.log('entity'+entity);
if (entity == 'abc')
{
current.assignment_group='sysidofthecommerciallegalgroup';
}
Please mark my answer as correct based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2022 12:02 AM
Finally I found the root cause, the script is working fine since I first shared actually.
The problem is the record producer's sys_id. Suppose that I copied it from another record producer, so that caused of unable to trigger the assignment rule because the applied to condition, I point to that one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2022 12:09 AM
I see so now you are going with the assignment group rule itself or you are setting it from record producer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2022 12:31 AM
Yes, finally I moved to record producer.
Thank you very much.