Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Review code

June Anderson
Tera Contributor

Just for sanity check, I modified a line of code to add multiple users.

 

Before code was 

    if (g_form.getValue('add_remove_group') == 'add') {

        var adminRole = g_user.hasRole('admin');

        if (adminRole) {

            g_form.setVisible('add_multiple_users', true);
 
After Code is
    if (g_form.getValue('add_remove_group') == 'add') {

        var userRole = g_user.hasRole('group_manager');

        if (userRole) {

            g_form.setVisible('add_multiple_users', true);
 
Please not very good with JavaScript, can someone please confirm if I am on the right track
1 ACCEPTED SOLUTION

Anurag Tripathi
Mega Patron
Mega Patron

Looks good June.

You can always test client side code using JavaScript debugger (ctrl+shift+Alt+j) on the form

-Anurag

View solution in original post

1 REPLY 1

Anurag Tripathi
Mega Patron
Mega Patron

Looks good June.

You can always test client side code using JavaScript debugger (ctrl+shift+Alt+j) on the form

-Anurag