catalog ui policy is not working on target record

Priyansh_98
Tera Guru

Hi,

 I have converted one catalog form into a record producer, all variables,ui policy and script is copied into the record producer. in that we have one ui policy which is used for making variable editable in the target record (a new custom table extended from task).

all working fine in my development instance but when i moved this update sets to QA instance, the variables are still ready only means it is not editable we don't have any script or UI policy in our custom table to make all variables read-only, but when i am executing a alert message from ui policy on target record it is showing the alert message as well, but field are still not editable. 

here i am attaching my screenshot for both dev and QA instance.

prs1_0-1692362860218.png

2. QA snapshot

prs1_1-1692362916720.png

can anyone here help me on this please..

thanks in advance..

 

8 REPLIES 8

manjusha_
Kilo Sage

@Priyansh_98 

 

If you want to apply ui policy on catalog item view and target record then you need to select both checkbox for 

1.Apply on catalog item view

2.Apply on target record

Go to when When to apply section> select above check box

 

3.If checkbox  'Apply on target record' not visible on form, you select it as true from list view of catalog ui policies

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

 

SwarnadeepNandy
Mega Sage

Hello @Priyansh_98,

 

There could be a few possible causes and solutions for the record producer issue in ServiceNow. One cause is that the target table or the variables have different read roles or write roles in the QA instance than in the development instance. You can check if this is the case by comparing the Dictionary Entry of the target table and the variables in both instances and making sure that they have the same roles.

Another cause is that the UI policy or the script is not running properly or not applying to the target record in the QA instance. You can check if this is the case by using the UI Policy Debugger or the Script Debugger to inspect the execution and results of the UI policy or script in both instances and making sure that they are working as expected.

A third cause is that there is a cache issue or a browser issue that is preventing the UI policy or script from taking effect in the QA instance. You can check if this is the case by clearing the cache or using a different browser to access the record producer and see if the variables become editable.

 

Hope this helps.

 

Kind Regards,

Swarnadeep Nandy

Community Alums
Not applicable

@Priyansh_98 --

 

It is an expected behavior. The catalog UI policies act on the variables and not on the form fields.


"Applies on the Target Record" - Select the check box to support the catalog UI policy on a record created for task-extended tables via record producers. See Default variable editor."

 

Solution : 

To make the fields mandatory/Read only/Editable , create a UI policy for the table instead of the catalog UI policy.

 

Additional Information

Create a UI policy for catalog items

 

Thanks!

@Community Alums I don't think ui policy creation for the table will work because we don't have any variable which is mapped to a field in table.