prevent change request closing without approvals

mick1
Kilo Contributor

I am new to being an admin for ServiceNow. We have been having an issue where our users are closing their change request even though it has not gone through the whole approval process. I am trying to find a way to prevent this from happening with the tool.

Is there a way from preventing the users from updating their change "State" from "Pending or Open" to "Close Complete or Close Incomplete" if the "Approval" attribute is anything besides approved?

13 REPLIES 13

Brian Dailey1
Kilo Sage

Hi Mickey,



You can definitely either:


  1. Use a business rule (run Before) with conditions that Approval is not approved and State changes to Close Complete or Close Incomplete, and have it abort the update to the record by using:
                      current.setAbortAction(true);

  2. Or, if you have locked down (made read-only) the State field, and are managing changes of state through UI Actions... then you can just add conditions to the UI Actions "Closed Complete" and "Closed Incomplete":

                                    current.approval == 'approved';




Does that help?




-Brian


I tried to enter BR as you suggested but it didn't work. It is still letting me update the state to Complete with the approval in a requested state.




Best regards,


Mickey Do


Can you provide us a screenshot of your BR settings and script?




Thanks,


-Brian







Best regards,


Mickey Do