- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2017 02:43 AM
Hello Everyone,
I have a requirement where i need to set list of fields as Read only:
1.Number
2.Type
3. Program
By configuring dictionary of the field i can set Type & Program as read only but i unable to set Number field as Read only.... I dont know whether it is a Best practice or not, can anyone please guide me the best practice to set read only for above fields
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2017 02:52 AM
Can i know the reason why you are going with Client Script.
In case its requirement, then go ahead with Onload client script and write the code as :---- g_form.setReadOnly("field_name",true);
But I would still suggest go ahead with UI policy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2017 02:46 AM
You can create a UI policy if you want to set a field as read only always (if unable at dictionary level).
http://wiki.servicenow.com/index.php?title=Creating_a_UI_Policy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2017 02:46 AM
Hi Shaik,
You set read only by using UI policy, client script or you can write ACL for number field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2017 02:48 AM
For Number field, go ahead and configure it via dictionary as it should be applicable everywhere but for the fields specific to a table use UI Policy if those field are not extended from parent tables.
Hope this helps you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2017 02:50 AM
Sneha,
can you help me out using client scirpting ?