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.

How to use Business Rule to prevent the creation of REQ

Gab
Tera Expert

Hello, I have a requirement to create a business rule which prevents the creation of REQ and RITM if one of the variables from a Catalog Item is invalid. I was able to prevent the creation of RITM but it is still creating the REQ. 

Gab_0-1681346660141.png

 

9 REPLIES 9

@Gab 

 

As per the ServiceNow best practices/standards this is not a good idea and not a valid method.

But to achieve your requirements you can do anything you know 🙂 😛

 

I would suggest go with the client level validations that's the right way as per your scenario!

 

If my answer solved your issue, please mark my answer as Correct & 👍Helpful based on the Impact.

Sorry, client-side validation is not enough. I can still put invalid data in a Catalog Item upon submitting a request 😓

@Gab ,

 

You can make the variables readOnly on "RITM" and "Task", just to avoid those scenarios 🙂

After submission of cat_item, RITM/task is the only place where user can modify data.

 

If my answer solved your issue, please mark my answer as  Correct & 👍Helpful based on the Impact.

My variables are user's input like selectbox and textarea 

It is possible, just make a script include with a method that check the table "sc_request", and than call the method on your client side.