Requested For field made editable, While Manager should be grayed out.

Shree Nag
Tera Expert

Hello,

I had a requirement that "Requested for" and "Manager" field in tasks should be made editable.

I followed this https://docs.servicenow.com/bundle/utah-servicenow-platform/page/product/service-catalog-management/... to got the requested for and manager field editable.

When the requested for is changed, manager gets auto populated, which is good.

Now that the user can edit the managers and can be misused, the requirement changed to only getting the requested for editable and manager should be grayed out.

How can I achieve of just manager field getting grayed out.? Attced is the pic for reference.

-Thanks

Shree

1 ACCEPTED SOLUTION

AnveshKumar M
Tera Sage
Tera Sage

Hi @Shree Nag 

It means there is another UI Policy or Client Script which is making it editable. You need to debug and find it out.

 

Or you can change the order of the UI Policy, set it to maximum like 2000. And if it doesn't work, create a client script to make the field read only.

Thanks,
Anvesh

View solution in original post

4 REPLIES 4

AnveshKumar M
Tera Sage
Tera Sage

Hi @Shree Nag 

Have you tried and UI Policy? Try creating an UI Policy on the form with conditions like the one below and save.

 

Requested for :: IS Not Empty

 

Then in UI Policy Action related list, click on new button and in the form opened, select the Manger field and make ready only check box true and save the form.

 

Now test your requirement.

 

Please mark my answer helpful and accept as a solution if it helped 👍✅

Thanks,
Anvesh

Thank you Avanesh for quick reply.

This will be on task or incident table?

 

 

Shree Nag
Tera Expert

Avanesh,

I was able to create the UI policy on task table, and the create a gray out policy for Manager field.

When tested, I fill the requested for field, the manager field grays for a millisecond and come back as editable field.

Could uou please throw some light on what may be wrong.

Attached is the Pic of the UI policy created.

Appreciate your help !

 

AnveshKumar M
Tera Sage
Tera Sage

Hi @Shree Nag 

It means there is another UI Policy or Client Script which is making it editable. You need to debug and find it out.

 

Or you can change the order of the UI Policy, set it to maximum like 2000. And if it doesn't work, create a client script to make the field read only.

Thanks,
Anvesh