- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2015 06:53 AM
All,
My requirement is to override the priority field when the assignment group = PeopleSoft. This group only uses priority, but do to the priority lookup rules everytime they need to change the priority it gets re-calculated based on impact and urgency. The client suggest that we override the priority just for this group.
In order to do this I created a onChange Client Script to grab the value of the Priority choice list into a string field
var var1 =g_form.getValue('priority'); | |
g_form.setValue('u_priority_override',var1); |
}
Now I would like to take that value from u_priority_override and re-insert back to the Priority field. However, I am unable to get the onBefore Business Rule to fire. I know this is easy, but I am not having any luck so I decided to ask the community.
setPriority();
function setPriority() {
if (value == 1){
current.priority = '1';
}
else if (value == 2){
current.priority = '2';
}
else if (value == 3){
current.priority = '3';
}
else if (value == 4){
current.priority = '4';
}
else if (value == 5){
current.priority = '5';
}
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2016 01:45 PM
All,
This is a late reply but I was able to resolve my issue. I have pasted my business rule below for reference to anyone else.
Table: Incident
When: Before update
Order: 10,000
Script:
setPriority();
function setPriority() {
var po = current.u_priority_override.getDisplayValue();//custom field that holds the value of the Priority
if (po == "1 - Critical"){
current.priority = 1;
//gs.log('PO = ' + po);
}
else if (po == "2 - High"){
current.priority = 2;
//gs.log('PO = ' + po);
}
else if (po == "3 - Moderate"){
current.priority = 3;
//gs.log('PO = ' + po);
}
else if (po == "4 - Low"){
current.priority = 4;
//gs.log('PO = ' + po);
}
else if (po == "5 - Very Low"){
current.priority = 5;
//gs.log('PO = ' + po);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2015 07:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2015 07:32 AM
Hi Sergiu,
I have looked at this thread and my client doesn't want to change the priority lookup (wants to keep what is OOB). They only want to override the calculation. Meaning when PeopleSoft group change Priority to 1 - Critical it should stay at P1 and not re-calculate based on impact and urgency.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2016 01:45 PM
All,
This is a late reply but I was able to resolve my issue. I have pasted my business rule below for reference to anyone else.
Table: Incident
When: Before update
Order: 10,000
Script:
setPriority();
function setPriority() {
var po = current.u_priority_override.getDisplayValue();//custom field that holds the value of the Priority
if (po == "1 - Critical"){
current.priority = 1;
//gs.log('PO = ' + po);
}
else if (po == "2 - High"){
current.priority = 2;
//gs.log('PO = ' + po);
}
else if (po == "3 - Moderate"){
current.priority = 3;
//gs.log('PO = ' + po);
}
else if (po == "4 - Low"){
current.priority = 4;
//gs.log('PO = ' + po);
}
else if (po == "5 - Very Low"){
current.priority = 5;
//gs.log('PO = ' + po);
}
}