In ServiceNow, an `onSubmit()` client script is a piece of JavaScript code that runs when a user submits a form. This script can perform various tasks, such as validating the form data, preventing form submission if the data doesn’t meet certain criteria, or modifying the form data before it’s sent to the server.
Requirement: If Incident P1 record is created or updated before inserting into database it will show confirm box.
function onSubmit() { //Type appropriate comment here, and begin script below var p = g_form.getValue('priority'); if (p == 1) { if (confirm("P1 Incident will create a manjor incident?")) { // do smothing } else { return false; } } }
No responses yet