
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2021 10:26 AM
I need to make a field read only after a value has been selected. But I need this to be affective in all views, not just on the form (e.g. List edit is also read only). I assume this is some kind of script, but I am fairly new at scripting and could use some guidance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2021 08:10 PM
Hi,
1.You can use UI policy to make any field read only if it is not empty(form View).
1.1 you can also use OnLoad Client script to make field read only
1.2
var a= g_form.getvalue("Field");
if(a!=''")
{
//Two Variable pass as a parameter
g_form.SetReadOnly('field',true);
}
1.3 But my suggestion you can use UI policy because it's priority is greater then Client Script.
2.You can use ACL to make field read only.(List VIew)
Thanks,
Vikas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2021 10:33 AM
Hi George, the list edit is normally controlled via ACL. So you need to create the 'list_edit' SCL for the required fields. See the details here:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2021 10:43 AM
So I need a UI Policy for the form and this for the List; they are controlled by different methods?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2021 10:59 AM
In fact, you can manage the form fields visibility with ACL as well. This will be the different ACL operation, where the conditions can be defined additionally to the allowed user roles.
The UI action normally doesn't check the user roles (if there is no existing ACL for the same condition) and dynamically change the behavior the objects on a form.
Hope this makes sense.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2021 10:52 AM
Hi George,
If it is for form u can go with client script:
Use on-change client script:
var abc= g_form.getvalue('fieldname');
if(abc!='')
{
g_form.SetReadOnly('fieldname',true);
}
or if it is for list :
U need to do with ACL's
Thanks,
Murthy
Murthy