Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

how to change the global submit button that it will stay on the current screen ?

chercm
Mega Sage

i have found the ui action for submit . it kept going back to the previous screen when using it for new incident 

 

// Insert the current record
current.insert();

// Include the ActionUtils såcript
gs.include('ActionUtils');
var au = new ActionUtils();
au.postInsert(current);

// Stay on the current screen
action.setRedirectURL(current);
2 REPLIES 2

Yashsvi
Kilo Sage

Hi @chercm,

please check try below script:

// Insert the current record
current.insert();

// Include the ActionUtils script
gs.include('ActionUtils');
var au = new ActionUtils();
au.postInsert(current);

// Set the redirect URL to the current record
action.setRedirectURL(current);

Thank you, please make helpful if you accept the solution. 

does not work look like the same as i posted