- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2018 06:02 AM
Hi, I need help with this simple requirement but appears to be tricky.
I only need to change the default value of the Priority field in the the Change module from 4 to 3 for Normal and Standard.
First I used UI Policy setting condition to type != emergency and use advance script to setvalue of the priority field to 3.
Result: on load for create new it works fine, however, when I open an existing change record it also changes to 3.
Second I used Client Script with onLoad type and using the same condition.
Result: is the same with the 1st configuration.
Third I used Dictionary override on Priority. The result works fine this time for existing records, but the problem is I cannot add the condition to only run for Normal and Standard.
Anyone here who happens to pin point what is wrong with my work? Thank you.
Solved! Go to Solution.
- Labels:
-
Change Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2018 04:21 AM
Oh yes, you can add a check for New Record.
var type = g_form.getValue("type");
if(g_form.isNewRecord()){
if(type== "normal" || type== "standard"){
g_form.setValue("priority", 3);
}else{
g_form.setValue("priority", 4);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2018 08:20 AM
I have tested and it worked for me. It would populate the right priority after submitting the record. Did you submit it?
Can you show me a full screenshot of your business rule?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2018 02:46 AM
Hi, the Priority should display onLoad not onSubmit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2018 02:54 AM
You can write an onLoad client script and try this once
var type = g_form.getValue("type");
if(type== "normal" || type== "standard"){
g_form.setValue("priority", 3);
}else{
g_form.setValue("priority", 4);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2018 04:09 AM
I tested this already, it works when you create New..but the script also changes value of existing records.. I have an existing change record with P1 priority and when this is enabled, when you open this record, it changes the value to P3 instead of keeping it P1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2018 04:21 AM
Oh yes, you can add a check for New Record.
var type = g_form.getValue("type");
if(g_form.isNewRecord()){
if(type== "normal" || type== "standard"){
g_form.setValue("priority", 3);
}else{
g_form.setValue("priority", 4);
}
}