- 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:52 AM
Hi,
you want to make it readonly or editable
your script is wrong; I mentioned it should be readOnly true
g_form.setReadOnly('field', true);
regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2022 05:24 AM
Hi
The script is correct. Currently, these fields are read-only. These should be editable once the UI is clicked.
The UI Action requirement is a combination of setting fields to read-only or editable.
- 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-06-2022 01:51 AM
Thanks! The cuprit was ACLs for all the fields I wanted to update. As a workaround, I created a true/false field. I set this true when the UI action is clicked, and used this custom field in the ACL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2022 08:28 AM
Hi,
are those fields readonly via dictionary level
OR
are those fields read-only via field level WRITE ACL
If ACL is there then you cannot use g_form
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader