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; } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter