Make Resolution code as Duplicate Incident When fulfiller resolves an incident, resolution code

Kaustubh k
Tera Contributor

Hi All,

 

Thanks for checking into my query , much appreciated.

 

We have a requirement:

When fulfiller resolves an incident, resolution code 'Duplicate incident' should only be selected if there is a parent incident for such incident

 

please help with best possible option for the ask or script for reference on the same.

 

Thanks

 

 

 

 

1 ACCEPTED SOLUTION

Mio Matsushita
Mega Sage

Hello

This requirement can be accomplished with an onChange Client Script for the parent field of the incident table.
The following code should work as expected.

image.png

 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
	if(!g_form.getValue('parent')){
		g_form.removeOption("close_code", "Duplicate");
	}else{
		g_form.addOption("close_code", "Duplicate", "Duplicate", 1);
	}
   //Type appropriate comment here, and begin script below
}

 

Please let me know if you have any additional questions.

View solution in original post

1 REPLY 1

Mio Matsushita
Mega Sage

Hello

This requirement can be accomplished with an onChange Client Script for the parent field of the incident table.
The following code should work as expected.

image.png

 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
	if(!g_form.getValue('parent')){
		g_form.removeOption("close_code", "Duplicate");
	}else{
		g_form.addOption("close_code", "Duplicate", "Duplicate", 1);
	}
   //Type appropriate comment here, and begin script below
}

 

Please let me know if you have any additional questions.