Closure codes dependent on assignment groups
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2023 10:48 PM
Hi Experts, could you please assist me on below requirement.
we have few groups with suffix “Apps-“. The requirement is, whenever these groups are selected under incident form, we have to display a particular closure code and make that closure code field as read only.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2023 10:55 PM
Hi,
You can do this using onChange client script.
Thanks and Regards,
Saurabh Gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2023 11:24 PM
Hi @Puneet4418 ,
Below is the sample code you can give a try :
function onLoad() {
if (g_form.getValue('assignment_group').endsWith("Apps-")) {
g_form.setReadOnly('u_closure_code', true);
}
}
Note : Make sure the group name ends with Apps- (case sensitive )
please mark this as helpful and correct answer if this helps you
Shravan
Please mark this as helpful and correct answer, if this helps you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2023 12:15 AM
- Yes possible via before Business rule
Condition : State Changes to Resolved and Assignment Group start/end with "Apps-"
Add in Script –
current.close_code = "";
current.update();
- Also Can be done via onChange clientScript on State
Script-
var getAssignGroup = g_form.getDisplayValue('assignment_group');
var getState = g_form.getValue('state');
if(getState == 6 && getAssignGroup.indexOf("App") >-1){
g_form.setValue(‘close_code, ‘ ’);
g_form.setReadOnly("close_code ",true);
}