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 07:52 PM
Hi @Bird1,
I would suggest to add assignment rule conditions on target table instead of record producer variables.
Sample scripts -
var entity = current.field_name;
if (entity == 'abc')
current.assignment_group.setDisplayValue("Commercial Legal");
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2022 07:55 PM
Hi Sagar,
The variable doesn't map to the field of 'sn_sm_legal_request' table. I tried with below script before but it doesn't work.
var entity = current.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 08:11 PM
Hello,
Please write the below script in the script part of the record producer:-
var entity = producer.align_entity_of_chop_applicant;
if (entity == 'abc')
{
current.assignment_group.setDisplayValue("Commercial Legal");
}
Please mark my answer as correct based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2022 09:23 PM
I tried with this script but not work.
var entity = producer.align_entity_of_chop_applicant; if (entity == 'abc') { current.assignment_group.setDisplayValue("Commercial Legal"); }