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.

change record state using scripts.

VSN
Tera Expert

i am working on the  one table. that table have state field and it contain state choices draft, work in progress, completed, approved,canceled. 

 in my form i have only button to change record to completed.

But i need to change record to approved state. i don't want to create button for now.

 

is their any alternate solution to change record stat???

2 REPLIES 2

AB3
Tera Expert

- You can create a Client Script to change the state of the record to 'Approved' when the button to change the state to 'Completed' is clicked. - The Client Script should check the current state of the record and if it is 'Completed', it should update the state to 'Approved'. - You can also use a Business Rule to update the state of the record to 'Approved' when the state is changed to 'Completed'. - You can also use a UI Action to update the state of the record to 'Approved' when the state is changed to 'Completed'.

 

For asking ServiceNow-related questions try this :
For a better and more optimistic result, please visit this website. It uses a Chat Generative Pre-Trained Transformer ( GPT ) technology for solving ServiceNow-related issues.
Link - https://nowgpt.ai/

For the ServiceNow Certified System Administrator exams try this :
https://www.udemy.com/course/servicenow-csa-admin-certification-exam-2023/?couponCode=NOW-DEVELOPER

VSN
Tera Expert

@AB3   can you provide the script if possible?