Set demand priority based on record producer values

SD29
Tera Expert

Hi All,

I have a Record Producer which creates a Demand.   The record producer has the Urgency and Impact values. When the record producer is submitted it creates a Demand where it create priority of the demand based on the Urgency & Impact values we select from the record producer. While the demand is getting created the priority is being calculated incorrect.

High/High is giving low priority. which is not correct.

FYI: 1) The priority is being calculated correctly when a demand is created manually but not from the Record producer.

              2) we don't have priority field on the record producer.

please help.

Thanks,

SD

1 ACCEPTED SOLUTION

You can use below script in the onBefore Insert business rule



current.priority = calculatePriority(current.impact, current.urgency);



Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

7 REPLIES 7

SanjivMeher
Kilo Patron
Kilo Patron

Hi,



Can you check, if there is a default value set in the priority dictionary field? You may need to remove that.



Or you may need to write an onBefore insert business rule to recalculate priority.



Please mark this response as correct or helpful if it assisted you with your question.

Hi Sanjiv,



Removing the default value on dictionary didn't resolve.



Could you please provide me sample script for onBefore Business rule?



Thanks,


SD


You can use below script in the onBefore Insert business rule



current.priority = calculatePriority(current.impact, current.urgency);



Please mark this response as correct or helpful if it assisted you with your question.

Since it's a record producer you need to pass the variable names. Replace current.impact with producer.u_impact (assuming the impact variable name is u_impact)