I have a requirement in record producer where the 'state' field and Assigned to field
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2023 04:52 AM
The state field should show If answer to all Yes/No questions is "Yes" set to Closed complete
Else set to Work in Progress and clear Assigned to and the assigned to field If answer to all Yes/No questions is "Yes" set to the user submitting the record
ELSE set to NULL
var abc = producer.v_top_light_yn.getDisplayValue();
var qaz = producer.v_info_button_yn.getDisplayValue();
if (abc == 'yes' && qaz == 'yes') {
current.assigned_to = producer.opened_by;
current.state = '3';
} else {
current.assigned_to = '';
current.state = '2';
}
I have written the above code .., i m not understanding where i m going wrong.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2023 05:24 AM
Can you update the script as below and let me know if it worked
var abc = producer.v_top_light_yn.getDisplayValue();
var qaz = producer.v_info_button_yn.getDisplayValue();
if (abc == 'Yes' && qaz == 'Yes') {
current.assigned_to = producer.opened_by;
current.state = '3';
} else {
current.assigned_to = '';
current.state = '2';
}