Edit button visible only to specific group

ServiceNow10sun
Giga Guru

Hi All , 

 

I have requirement that the edit button in related list ' Approver' in change form   should be visible to group 'Wrap group' .

 

Please provide the steps to do it . 

is it possible without script include.

sunita10_0-1678944911889.png

 

1 ACCEPTED SOLUTION

Teja11
Giga Guru

Hi @ServiceNow10sun ,

 

right click on any field on the related list - > configure -> list control

 

in that write this script "!gs.getUser().isMemberOf('Wrap Group');" in the omit edit button script

 

Teja11_0-1678945929830.png

 

 

 

Regards,

Teja

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.

View solution in original post

9 REPLIES 9

Ratnakar7
Mega Sage
Mega Sage

HI @ServiceNow10sun ,

 

Yes, it is possible to make the edit button in the related list visible to a specific group without using a script include. Here are the steps you can follow:

  1. Go to the related list "Approver" in the change form and click on the gear icon to configure the related list.
  2. In the related list configuration page, click on the "List Control" tab.
  3. In the "List Control" tab, select the "Actions" section.
  4. In the "Actions" section, find the "Edit" action and click on the "Condition" field next to it.
  5. In the "Condition Builder" popup, click on the "Advanced" tab.
  6. In the "Advanced" tab, enter the following condition in the "Condition" field:

 

 

gs.hasRole('Wrap group')

 

 

This condition will check if the currently logged-in user belongs to the "Wrap group" group.

 

      7. Click on the "Update" button to save the condition and close the "Condition Builder" popup.

     8. Click on the "Save" button in the related list configuration page to save your changes.

After completing these steps, the "Edit" button in the "Approver" related list will only be visible to users who belong to the "Wrap group" group.

 

If my response helps you to resolve the issue close the question by Accepting solution and hit 👍thumb icon. From Correct answers others will get benefited in future.

 

Thanks,

Ratnakar

Could you please help me with screen shot : i cannot see any action button in the list control table as well and even in the related list of approver -- configure--List control :

sunita10_0-1678951861211.pngsunita10_1-1678951911720.png

 

Once the List control record is opened.

Get the omit edit condition field on to the form  "form design" or "form layout"

 

and then try this script there.

!gs.getUser().isMemberOf('Wrap Group');

 

Service_RNow
Mega Sage

Hi @ServiceNow10sun 

1 Solution:-

you can try with the group name in isMemberOf().

gs.getUser().isMemberOf('Group Name')

RamSingh_0-1678946039727.jpeg

2 solution:-

No need to add the condition just create a new role and assigned the to that groups you wants to give the permission and just specify the role in the UI Action you will get your requirement for sure, its easy and reliable.

 

Mark helpful if it helps in solving your query.

I hope that this helps,

Jim Coyne
Kilo Patron

What you should do is:

1. create a new Role

2. add that Role to the Group

3. select the Configure / List Control menu item

 

JimCoyne_1-1678946261302.png

 

4. add the Role to the "Edit roles" field

 

JimCoyne_0-1678946084994.png

 

This is what is known as "configuring the list controls".