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.

When user clicks on Review button on change form, attachment should be mandatory.

PhanitaM
Tera Contributor

Hi Team ,

 There is a requirement ,  where if user  clicks on Review button on the change form , it should through an alert that '  Please attach proof of change completion ' . And after adding the attachment it should move to Review state. 

If the Ticket is already having attachment it should  through a reminder with the same message.

 can someone help  me to achieve.

Currently it is troughing alert but even after attachment it is not moving to  review state.

PhanitaM_0-1765106374528.png

script include:

PhanitaM_1-1765106441354.png

Thanks

7 REPLIES 7

Ankur Bawiskar
Tera Patron
Tera Patron

@PhanitaM 

is your state model allowing CHG to move from Your current state to Review?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

Hi @Ankur Bawiskar ,

Yes, the state model allows CHG to move to the "Review" state.
However, currently, even after adding the attachment, the ticket remains stuck in the "Implement" state. When we click on the "Review" state, it briefly changes, but after reloading, it reverts back to "Implement."
PhanitaM_0-1765115331353.png    

 

Thanks,

@PhanitaM 

so what debugging did you do in client side?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

Hi @Ankur Bawiskar ,

I didn’t find any client script causing this behavior. My apologies for the earlier assumption.
What I observed is that when clicking on the "Review" state, the form submits, and for a fraction of a second, the state shows as "Review." However, after the submission completes. If i reopen the form it is showing state as implement.