Hide/Show field in related list based on the condition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2023 04:35 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2023 08:26 AM - edited 04-22-2023 08:27 AM
Hello @Pragati Ajanalk
May I know the purpose of hiding/showing the field?
If you want to restrict users to not edit the priority field You can write a before-business rule on the related list table to abort the action on basis of the flag value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2023 08:45 AM
Hi @Pragati Ajanalk ,
You can achieve this by creating 2 views one with a related list of priority in it and in another hide the priority from the related list. After that create a view rule based on your condition for showing and hiding the desired related list.
Please mark my reply as helpful, if it helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2023 05:44 PM
Hi.
Did you explore UI Policies for related list?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2023 06:04 PM
Set up a UI policy that checks if the current record has the 'flag' field as false. Then, in the Scripts tab of the UI Policy, enter
g_form.hideRelatedList(<enter the "REL:sys_id" value of the list here>);
in the "Execute if true" script box.