Related list is not visible in onload client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2025 12:11 PM - edited 07-24-2025 09:43 PM
Hello,
I am doing a task where depends on a field value I need to Hide/Show a related list in 'GRC: Policy and Compliance Management'
Functionality is already available in client scripts, OnLoad and OnChange client scripts.
I just added one more condition in the scripts. In DEV both are working fine. But in QA Onload functionality is not working.
The client script names are "Source management on load" and "Source management on change".
On Change the Related list is visible after saving the record the related list is not visible/hidden. It is only in QA not in DEV.
I have verified the plugin version is same in both the instance.
Additional info: I am able to reproduce the issue in my PDI.
I added an OR condition in the client script 'Source management on load' and facing the issue.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2025 03:36 AM
Hi Pranesh,
Yes, I did tried that but after saving the form the impacted control related list is not visible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2025 05:34 AM
Can you share your script again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2025 06:45 AM - edited 07-25-2025 06:45 AM
if (g_form.getValue('source_type') == 'controls' || g_form.getValue("policy_statement") || g_form.getValue('issue') || g_form.getValue('policy')) {
g_form.showRelatedList('sn_compliance_m2m_policy_exception_control.policy_exception');
g_form.showRelatedList('REL:56a77345d7700300bbc783e80e6103b9');
} else {
g_form.hideRelatedList('sn_compliance_m2m_policy_exception_control.policy_exception');
g_form.hideRelatedList('REL:56a77345d7700300bbc783e80e6103b9');
}
Everything is OOB I added only one this || g_form.getValue('policy')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2025 10:56 PM
Update your if condition as
if (g_form.getValue('source_type') == 'controls' || g_form.getValue("policy_statement") !=''|| g_form.getValue('issue')!='' || g_form.getValue('policy')!='') {
g_form.showRelatedList('sn_compliance_m2m_policy_exception_control.policy_exception');
g_form.showRelatedList('REL:56a77345d7700300bbc783e80e6103b9');
} else {
g_form.hideRelatedList('sn_compliance_m2m_policy_exception_control.policy_exception');
g_form.hideRelatedList('REL:56a77345d7700300bbc783e80e6103b9');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2025 02:39 AM
Still not working.