Setting impact or urgency via script on a Record Producer doesn't work

Chad7
Tera Expert

I have a Record Producer on a portal that creates Incidents, and every other field that I set via script works correctly, except Impact and Urgency. I want to set the Impact and the Urgency and let the system handle the Priority via the Data Lookup Definitions, but it's like my script gets ignored entirely for these two fields and the Impact is always set to "Individual" and the Urgency is always "No Immediate Urgency" on the resulting Incident, no matter what I do.

 

Is there something in the platform that actively prevents these fields from being set in this way, or what gives?

 

 

current.contact_type = 'self-service';
current.short_description = producer.short_description;
current.description = producer.description;
current.urgency = '1';
current.impact = '2';
5 REPLIES 5

Mohan raj
Mega Sage

Hi @Chad7,

In Script, your passing string value to impact and urgency. so it was not accepting string try instead of string pass the value of the choice
For example

 

current.contact_type = 'self-service';
current.short_description = producer.short_description;
current.description = producer.description;
// value of the choice's 
// High - 1
// Medium - 2
// Low - 3
current.urgency = 1;  
current.impact = 2;

 

If my response helps you to resolve the issue close the question by Accepting solution and hit thumb icon. From Correct answers others will get benefited in future.

Thanks Mohan, I had that idea also and it doesn't matter whether I use the value (e.g. '1') or the label ('Blocking Critical Business'), the result is always the same.

Vasu ch
Kilo Sage

Hi @Chad7 

There are no such things on OOB preventing the population of impact and urgency fields from the portal. I've passed integer values to impact and urgency and I see it's working.

current.short_description = producer.short_description;
current.impact = 2;
current.urgency = 1;

Try removing the apostrophe(') and pass the integer values. 

 

Regards,

Vasu Ch

Thanks, I've tried that as well and still no luck. There must be something custom in this instance that is preventing it from working, but I have no clue what it could be at this point.