How cancel change UI page is called from UI action?

rohitservicenow
Mega Guru

Hi,

I have been trying to understand, how cancel change ui page (change_confirm_cancel) is called from UI Action

 

rohitservicenow_0-1668404678585.png

 

To me, line 1 looks just like a variable declaration and it's not doing anything.

Tried checking the UI scripts with no luck. Can someone help me understand how the UI page is called and a dialog window is presented?

 

Thanking you in advance

 

1 ACCEPTED SOLUTION

Hi @rohitservicenow ,

If you wanted to cancelled the change request without any dialog then make modification in UI action as below :-

//var changeConfirmCancelDialog;

function setChangeCancelState() {
	gsftSubmit(null, g_form.getFormElement(), 'state_model_move_to_canceled');   // Action Name 
}
if (typeof window == 'undefined') {

current.state= '4';
current.update();

//will be on the current page after UI action
action.setRedirectURL(current);

}

Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy

View solution in original post

5 REPLIES 5