Populate urgency from Service Offering in the case form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
9 hours ago
How to achieve the below requirement in the case form
Populate urgency from Service Offering based on busines_criticality in the case record form.
I have tried below before business rule but not works in the case form, could you please suggest how to fulfill this requirement.
(function executeRule(current, previous) {
if (!current.service_offering)
return;
var soGR = new GlideRecord('service_offering');
if (soGR.get(current.service_offering)) {
var criticality = soGR.getValue('busines_criticality');
switch (criticality) {
case 'Extremely Urgent':
current.urgency = '1';
break;
case 'Highly Urgent':
current.urgency = '2';
break;
case 'Medium Urgent':
current.urgency = '3';
break;
case 'Low Urgent':
current.urgency = '4';
break;
case 'Not Urgent':
current.urgency = '5';
break;
}
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
9 hours ago
Hi @ashok17 ,
Before business rule work only when record is inserted/updated so it won't update the record dynamically. To achieve this requirement you can go with on change client script and script include based on "business_criticality" in the case record form. If "business_criticality" changes in the case record form then populate Service Offering.
Also please check the field name should be "business_criticality" instead of "busines_criticality".
Please mark helpful & correct answer if it's worthy for you.