escalateIncident()

PHOTO EMBED

Mon Dec 13 2021 13:26:31 GMT+0000 (UTC)

Saved by @mathiasVDD #javascript

function escalateIncident() {
    var answer = confirm("Are you sure you want to cancel this record?");
    //Set the 'Incident state' and 'State' values to 'Resolved', and display mandatory fields
    if (answer == true) {
        g_form.setValue('incident_state', 6);
        g_form.setValue('state', 6);
        g_form.setValue('resolved_by', g_user.userID);
		gsftSubmit(null, g_form.getFormElement(), 'resolve_incident'); //MUST call the 'Action 	name' set in this UI Action
    } else {
        return false;
    }
}
content_copyCOPY

Set action name in ui action action name must be set in gsftSubmit