Create 'Cancel' Button to Cancel Request for Change Request

UdhayakumarS559
Tera Contributor

Hi all ,

I would like to add a 'Cancel' button to the Change Request (change_request) form.

UdhayakumarS559_0-1751297807841.png

 

📌 Requirement:
At the top-right corner, there should be an option to press 'Cancel', which should:

  • Cancel the current change request (e.g., set the state to Canceled)

  • Exit the form

  • Undo the attempt to submit the request

As shown in the attached screenshot, I’d like this button to behave similarly to the 'Delete' or 'Update' buttons, but specifically to cancel the request gracefully.

Can anyone suggest the best way to implement this — using a UI Action or another approach?
If using a UI Action, please provide the correct steps to create it, the script code, and the UI Action order (as the order affects whether the button is displayed properly).

Thank you!

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

@UdhayakumarS559 

it's an easy requirement.

where are you stuck?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

UdhayakumarS559
Tera Contributor

My requirement is:

  1. When I click the Cancel button, the out-of-the-box "Cancel Change Request" confirmation popup should appear.

  2. Only the State field of the current change request should be updated (not the entire record).

  3. Finally, it should redirect to change_request_list.do (Change Request list view page)

How can I achieve this? Could anyone please respond?

UdhayakumarS559_0-1751369884090.png