- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2023 06:22 AM
My requirement is:
By using 'Resolve' UI Action in Incident, While changing the state to 'Resolve' from 'Inprogress', Service offering field value should clear and assignment group/assigned to need to fill the service offering field. I am done this, but again If I am clicking the Resolve UI action after updating the service offering, the form is not saving, again it is clearing the service offering value.
Please help me on After updating the Service Offering value, the form should save and service offering value should be update.
Thanks,
ManiKanta
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2023 06:36 AM
Hi @Manikanta G
Write onChange Client script on Incident form, Please use below code for your requirement.
Client Script:
Type: onChange
Field Name: State
//Add your script here
if(isLoading || newValue === '') {
return;
}
if(oldValue == "2" && newValue == "6" && g_form.getValue("assignment_group") && g_form.getValue("close_code") == "None" || g_form.getValue("close_code" == ' ') {
g_form.clearValue(''service_offering");
//add error message, if required
g_form.addErrorMessage('Fill the Mandatory Values and click on Resolve);
}
}
Please test this code in your non-prod instance and test thoroughly before moving to prod.
Please hit like/Accept as solution, if it works for you.
Thanks,
Harish Kota
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2023 06:36 AM
Hi @Manikanta G
Write onChange Client script on Incident form, Please use below code for your requirement.
Client Script:
Type: onChange
Field Name: State
//Add your script here
if(isLoading || newValue === '') {
return;
}
if(oldValue == "2" && newValue == "6" && g_form.getValue("assignment_group") && g_form.getValue("close_code") == "None" || g_form.getValue("close_code" == ' ') {
g_form.clearValue(''service_offering");
//add error message, if required
g_form.addErrorMessage('Fill the Mandatory Values and click on Resolve);
}
}
Please test this code in your non-prod instance and test thoroughly before moving to prod.
Please hit like/Accept as solution, if it works for you.
Thanks,
Harish Kota
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2023 07:11 AM
Thank you very much harish, solution worked for me.