For a Particular form view make a section's fields Read only for all users

Niletor
Tera Contributor

I have a Form of Request for which has 4 views out of which for 2 Particular views I want to make a section's all 3 fields to be Read-only for all users/roles, on these two views. How should I approach this 

1 ACCEPTED SOLUTION

Moin Kazi
Kilo Sage
Kilo Sage

Hi @Niletor ,

 

You can create UI Policy on Specific View - For that you have to uncheck Global check box and in the View field, provide View name(Example - Service Portal) then your UI policy will only applicable for selected view. And create UI Policy Action to set your field as ReadOnly.

 

Please find few images for this -

MoinKazi_0-1728543388987.png

MoinKazi_1-1728543432183.png

 

Output -

MoinKazi_2-1728543487264.png

 

Mark MoinKazi_3-1728543536369.png Correct if this solves your issue and also mark MoinKazi_4-1728543536369.png Helpful if you find my response worthy based on the impact.

 

Regards

Moin

View solution in original post

5 REPLIES 5

Same way as we are hiding fields in above post, We can Hide Form Section.

Only 1 step we need to change It-

 

For field we use UI Policy Action to hide, mandatory or visible field, but in case of form section we will use UI Policy script and you can write below code under it to Hide Section -

 

g_form.setSectionDisplay('resolution',false);
 
See Images -
MoinKazi_0-1728566625208.png

 

MoinKazi_1-1728566665327.png

 

Before UI Policy - 

MoinKazi_3-1728566767574.png

 

Output: After UI Policy Applied -

MoinKazi_2-1728566728681.png
 
[Note - Form Section always configure for specific view, so you have always opportunity to remove Form Section through Form Design].
 
Hope this help you.
 
Thanks
Moin