Make section fields read only using onload client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2024 01:46 AM
Hi,
In my table there are 2 sections, I need one field under the section, which should be read only when the state is assigned (after making the changes as state=assigned and saving/submitting the form). i tried the below code it is working for the fields not in section but not working to section fields. The script is...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2024 08:01 AM
Please check if field is set as mandatory.
Looking in your screenshot field 'Triage Outcome Summary' is mandatory and making it read only will be restricted and that may be the reason for not making field read only. This is completely logical when field is mandatory then it can not be read only.
Next poosibilties:
1. Identify from where this field is made mandatory (client script / UI policy) and then adjust the code based on your condition to make it readonly.
or
2. in you above code, make field non-mandatory first and then make it read only.
Regards,Sushant Malsure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2024 02:10 AM
Thank you all, your responses helped me but not to achieve the proper requirement
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2024 07:08 AM
What did you create can you show that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2024 03:26 AM
You can Use the same via UI policy & UI Policy Actions, No code solution and more efficient,