Control the access of choices in drop down menu based on roles

Jenish2
Tera Contributor

Hello friends,

 

I am working on a requirement.

How to achieve this.

Thanks

Jenish

1 ACCEPTED SOLUTION

Ashish Parab
Mega Sage

Hi @Jenish2 ,

 

You can implement this functionality by creating onLoad client script.

function onLoad() {
if (g_user.hasRole('manu_role') ) {
        // Remove the specific choice for "Manu Role" users
        g_form.removeOption('your_choice_field', 'value_of_the_choice_to_remove');
    }
}

 

Please mark this as "correct" and "helpful" if you feel this answer helped you in anyway.

 

Thanks and Regards,

Ashish

View solution in original post

1 REPLY 1

Ashish Parab
Mega Sage

Hi @Jenish2 ,

 

You can implement this functionality by creating onLoad client script.

function onLoad() {
if (g_user.hasRole('manu_role') ) {
        // Remove the specific choice for "Manu Role" users
        g_form.removeOption('your_choice_field', 'value_of_the_choice_to_remove');
    }
}

 

Please mark this as "correct" and "helpful" if you feel this answer helped you in anyway.

 

Thanks and Regards,

Ashish