- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2016 02:31 AM
Hello,
I have a custom reference field on a Change form, called Template. That field references System Definition->Templates. If I select a template, then some fields are populated on the form.
This all works fine, however I'd like to achieve that as soon as a field is populated(due to the selection of the template) make it read-only, not editable.
I've tried several options(client scripts, business rule, ACL, etc.), but none of them working as expected, although I'm new to ServiceNow, so it could be I was not doing it the right way.
Those fields that are populated due to the template can also be read-only by default, however when I was unable to achieve that(tried using ACLs, but I've found that read-only fields were not populated when I selected a template).
I need to make sure that as soon as a template is selected, the values that is populated on the form are not editable. I want to achieve this dynamically(without Saving the form).
Could you please give me some guidance on how to achieve this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2016 02:55 AM
Right off my mind I would turn to ui polices. Not sure if you need to make 1 ui policy for each field or you can make only one with some fancy condition, haven't thought to so much on it. It's pretty much to choose from a few simple ones or one complicated one.
But it should work if you have a UI policy with condition that if field template isn't empty and field b(which the template fills) isn't empty, then read only sets on field B.
Shouldn't that work?
//Göran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2016 10:07 AM
Hi Gergely,
Were you able to figure out how to make it as read-only? Can you share what you did to make it RO? Thanks
I followed the steps to create a UI Policy and got lost in setting condition "Template is not empty".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2016 01:22 AM
Hi,
I've created the UI Policy on Change Request table and set the condition like the following:
After this in the UI Policy Actions I configured the required field read-only:
The Template field is a custom Reference type field with the following settings:
I hope this helps,
Gergo