The CreatorCon Call for Content is officially open! Get started here.

Make Assignment group as mandatory Once incident created (Not for new Records)

krithvik
Mega Contributor

Hi,

I have one issue that after incident created some one remove the assignment group as saved,So need to stop this behavior that after incident created assignment group should make assignment group as mandatory for reassignment of queue(Not allowing to save incident with out any Queue).

Kindly help to achieve this.

Note: I don't want to make assignment group field as mandatory in configuration 

 

Thanks & Regards

Krithvik

 

 

7 REPLIES 7

sachin_namjoshi
Kilo Patron
Kilo Patron

You can configure UI policy to make assignment group field mandatory.

 

Regards,

Sachin

Brad Bowman
Kilo Patron
Kilo Patron

You'll want to handle this on the server-side to cover all of the ways AG could be blanked out - when viewing the incident form, List view/Cell edit, API, scripts, ...  Create a business rule that looks like this

find_real_file.png

Your Script on the Advanced tab should contain this

(function executeRule(current, previous /*null when async*/) {

	if(current.assignment_group == ''){
		current.setAbortAction(true);
	}

})(current, previous);

 

sachin_namjoshi
Kilo Patron
Kilo Patron

Instead of UI policy, you can configure data policies so that it works on both client and server side validations.

 

find_real_file.png

 

Regards,

Sachin

Alok Das
Tera Guru

Hi Krithvik,

You can set the assignment group mandatory with the use of client script. You need to have a onLoad client script, please find the script below.

function onLoad() {
    //Type appropriate comment here, and begin script below
    if (!g_form.isNewRecord()) {
        g_form.setMandatory('assignment_group', true);
    }
}

From above script assignment group will be mandatory for existing incident but not for new one.

Kindly mark my answer as Correct and helpful based on the Impact.

Regards,

Alok