Hide the Employee and Contractor account type to only display and be selectable for the one group

Naveen10
Tera Expert

Hi,

I am figuring out how to hide Question Choices on a Select Box type Employee and Contractor account type to only display and be selectable for the NerveCenter group.

The variable name is the Account type Question Choices on a Select Box we have 5 Employee, Contractor, Service Account, Resource Account, and Support Account. Employee and Contractor account type to only display and be selectable for the name of the Support group.

Any assistance would be greatly appreciated.

 

 

 

 

4 REPLIES 4

gajananvwit
Tera Contributor

Hi ,

 

Write onchange client script on group and write below script

if(g_form.getValue('assignment_groupname') =='groupSysID'))

      g_form.removeOption('fieldname','employee and contractor value');

Hi, thank you for replying. But it's not working employees and the Contractor should be visible for Support group members only

 

I created a Catalog Client Script but it is not working.

function onLoad() {
var user = g_form.isMemberOf('fdca58e7dbe163007c679d62ba9619e9');
var question= g_form.getValue('account_type');
if(user==true);
{
    alert('test');
    g_form.removeOption(question, 'employee');
    g_form.removeOption(question, 'contractor');
}
}

Ehab Pilloor
Mega Sage

Hi Naveen,

You should use Catalog UI policy instead of client script. You can make the fields visible only for the Support group and check reverse if false to true.

 

If you found this reply helpful, please mark it as solution/helpful.

 

Thanks and Regards,

Ehab Pilloor