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.

Close Catalog Task without filling mandatory fields

Shruti Chelimel
Tera Expert

I have a requirement to close catalog task without filling in mandatory fields like assigned to/work notes which are set mandatory using data policy. I want this closure to happen in the workflow run script that is server side. 

Is there any way to achieve this requirement? 

Please provide your valuable inputs as I am struggling with this from many days.

 

Thanks

1 ACCEPTED SOLUTION

Shruti Chelimel
Tera Expert


I have used gr.setUseEngines(false) in my code. After my code runs i have used gr.setUseEngines(true), so that all other things will run fine. 

And this has resolved my issue..

View solution in original post

4 REPLIES 4

Brian Lancaster
Kilo Patron

If you remove data policies and replace them with UI Policies I believe you will be able to script the closer of the task.

Hello,

 

Thanks for your reply. 

Is there any other way to do this? I am afraid if deactivating data policy will impact anywhere else.

 

I just want this to work for one workflow run script.

 

Sumanth16
Kilo Patron

Hi @Shruti Chelimel ,

 

 

I think you should go with UI Policy here.

g_form.checkMandatory = false;
Try this and let me know if it solves your issue.
Please mark this as helpful/correct for others to benefit from this.
 
 
Thanks & Regards,
Sumanth Meda

 

Shruti Chelimel
Tera Expert


I have used gr.setUseEngines(false) in my code. After my code runs i have used gr.setUseEngines(true), so that all other things will run fine. 

And this has resolved my issue..