Difference between setReadonly() and setDisabled() in Client Script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2022 05:44 AM
I have gone through many such articles stating the exact difference between the both functions , but hardly able to get the proper difference , please share some good idea which could clarify the concerns.
Regards.
Shikha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2022 05:50 AM
Hi Shikha,
- SetReadonly is used to make the field read-only if true. Makes the field editable if false.
- SetDisabled is used to make field gray out and unavailable.
- Note: Both setReadOnly and setReadonly are functional.
Use UI Policy instead of this method.
Regards,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2022 06:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2022 03:18 AM
Hi Shikha,
Please refer the old thread: What is difference between setReadOnly() and setDisabled() function?
Regards,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2022 03:28 AM
Hi,
what's your business requirement here?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader