- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2022 04:20 AM
Hello!
I am creating a UI Action wherein clicking the UI Action would set some fields to read-only and other fields to editable.
Is there a way to do this?
Please help!
Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2022 06:53 AM
Hi,
If those fields are made read only at dictionary level or through ACL then you won't be able to make it editable by UI action. Check what making it read only.
Let me know if you have any further queries.
Please mark this as Correct or Helpful if it helps.
Thanks and Regards,
Abhijit
Community Rising Star 2022
Regards,
Abhijit
ServiceNow MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2022 04:49 AM
Values should be true instead of false
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2022 05:20 AM
The script is correct. These 2 fields need to be editable when the button is clicked.
There are other fields which should be read-only but I did not include in the screenshot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2022 06:49 AM
Can you check if these fields are readonly at dictionary level?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2022 04:49 AM
Hi,
g_form.setReadOnly('renewable', true); you have added as false which will not make it read only
Regards,
Musab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2022 05:23 AM
The script is correct. Those fields should be editable when the UI button is clicked.
There are other fields that will be read-only but I have not added those yet.