What is difference between setReadOnly() and setDisabled() function?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2016 11:22 PM
Difference between setReadOnly() and setDisabled() function
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2016 01:01 AM
Hi sonali,
setReadonly(fieldName, boolean)
- Makes the field read-only if true. Makes the field editable if false.
- Note: Both setReadOnly and setReadonly are functional.
- Best Practice: Use UI Policy rather than this method whenever possible.
setDisabled(fieldName, boolean)
- Grays out field and makes it unavailable.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2016 01:13 AM
SetReadonly is:
- Makes the field read-only if true. Makes the field editable if false.
- Note: Both setReadOnly and setReadonly are functional.
- Best Practice: Use UI Policy rather than this method whenever possible.
SetDisabled is used to make field gray out and unavailable.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2016 01:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2016 01:43 AM
Hi
setDisabled() function Grays out field and makes it unavailable.
where setReadOnly() Makes the field read-only if true, editable if false
Thanks
Akash Sharma