Priority is not updating with business rule script
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 10:21 AM
Ive tried using this script and the priority never changes. Ive only been able to set them when priority lookup on dl_definition.list table is inactive. Any help is appreciated
- gr.impact.setDisplayValue = "2 - Medium";
- gr.urgency.setDisplayValue = "1 - High";
- gr.urgency = "1";
- gr.impact = "2";
- gr.urgency = 1;
- gr.impact = 2;
- gr.urgency = '1';
- gr.impact = '2';
// Query the table for the records to update
var gr = new GlideRecord('incident');
gr.addEncodedQuery("active=true^stateIN1,6^assignment_group=35014c3c1b1f19107307ff3f034bcb46^short_descriptionSTARTSWITHProduction APPLICATION-"); // Filter by state
gr.query();
while (gr.next()) {
// Set the urgency and impact fields to the desired values
gr.urgency = '1';
gr.impact = '2';
gr.update();
}
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 11:45 AM
Hello @Brian S5
Good day.
Data lookup definition will have a higher precendence in setting the values of a field when compared to server side scripts.
This is an expected platform behavious, and unfortunately cannot be changed.
Deactivating the lookups are mentioned by you seems to be the only viable solution here.
You can read more about this in the documentation below: