- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2017 01:58 PM
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
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2017 02:23 PM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2017 02:04 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2017 02:10 PM
Hi Sanjiv,
Removing the default value on dictionary didn't resolve.
Could you please provide me sample script for onBefore Business rule?
Thanks,
SD

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2017 02:23 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2017 04:07 PM
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)