How to make catalog form as ready only after task status changed to closed complete.

Deepika43
Tera Contributor

In my requirement need to make the catalog form to be closed complete after task status was changed to closed complete. 
In detail, If the approval is approved. It will create catalog task with status closed complete. Next, step should be once the catalog task was created with closed complete the catalog form should be read only.

I used client script for this but not working. Here I attach the screenshot of the script. 

Deepika43_0-1695192624736.png

Please suggest is any other method. 
If UI policy means no. I will affect globally. Only for x catalog item this should be done. 

 

2 ACCEPTED SOLUTIONS

Sagar Pagar
Tera Patron

Hi @Deepika43,

 

Make sure that values for close complete is correct and

 

Syntax:

 g_form.setReadOnly('field_name', true/false);

 

I would suggest to use UI policy with needed conditions and add fields with Read only as true.

 

If my response helps to solve your issue. Kindly mark it as helpful & correct. It will be helpful for future readers! 👍🏻
Thanks,
Sagar Pagar

The world works with ServiceNow

View solution in original post

Daniel Borkowi1
Mega Sage

@Deepika43 , I would use a UI Policy or Client Script within Catalog Item (Maintain Item --> Your Catalog Item --> related List UI Policy or Client Script). And remove in your Condition "Closed Complete" with "3".

Greets
Daniel

Please mark reply as Helpful/Correct, if applicable. Thanks!

View solution in original post

5 REPLIES 5

Deepika43
Tera Contributor

As mentioned UI policy is the only solution for this.