Priority is not updating with business rule script

Brian S5
Kilo Sage

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

 

BrianS5_0-1676398818175.png

 

  • 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

SatyakiBose
Mega Sage

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: