Group based related list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2022 04:47 AM
HI Team ,
There is requirement to create related list and that related list should be able to access to Particular groups!
Also there is Field called regulator this has 2 values CTC and SEC
When we select For CTC then the created related list should be able to access this 2 groups ABC_admin and ABC_ASSISMENT
and When we select SEC then the created list should be able to access this 2 groups ABC_complience and XYZ _approval
I have Created the Related List however I am looking help to scripting part How can I achive this requirement
Looking forward your help in this .
Thanks In advance .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2022 05:05 AM
hello
you can write an on change client script for this on the regulator field
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '')
return;
if(newValue=="CTC_choice_value" && (g_form.getValue('assignment_group')=="ABC_admin__group_sys_id" ||g_form.getValue('assignment_group')=="ABC_ASSESSMENT_group_sys_id" ))
{
g_form.showRelatedList('your_related_list_name');
}
else if(newValue=="SEC_choice_value" && (g_form.getValue('assignment_group')=="ABC_compliance_group_sys_id" || g_form..getValue('assignment_group')=="ABC _approval_group_sys_id"))
{
g_form.showRelatedList('your_related_list_name');
}
}
please mark my answer correct if it helps you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2022 01:58 AM
Some modifications
I could find out Insted of choice there is Records , I mean CTC and SEC are records which is refering someother table ...
How can i do that ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2022 03:40 AM
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '')
return;
if(newValue=="CTC_sys_id" && (g_form.getValue('assignment_group')=="ABC_admin__group_sys_id" ||g_form.getValue('assignment_group')=="ABC_ASSESSMENT_group_sys_id" ))
{
g_form.showRelatedList('your_related_list_name');
}
else if(newValue=="SEC_sys_id_value" && (g_form.getValue('assignment_group')=="ABC_compliance_group_sys_id" || g_form.getValue('assignment_group')=="ABC _approval_group_sys_id"))
{
g_form.showRelatedList('your_related_list_name');
}
}
MARK MY ANSWER CORRECT IF IT HELPS YOU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2022 03:59 AM