How would I limit a UI action to a certain group

Abhishek64
Kilo Contributor

How would I limit a UI action to a certain group?

We have a group in ServiceNow and want UI action tabs should be visible for these groups members only and below condition already in placed. Now want to add one more condition for limit the access to one group only.

please help me on it. (both condition should be work)

 

current.subcategory=='mailbox_update'

1 ACCEPTED SOLUTION

Imran Ahmad1
Kilo Guru

Hii Abhishek,

I have a suggestion, 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.

 

Regards,

Imran Ahmad

 

Please mark helpful below

 

View solution in original post

12 REPLIES 12

Don't use hard-coded sysid instead of creat property and call the property in condition builder

ccajohnson
Kilo Sage

Let us know if this is a UI Policy and how it behaves when the condition is true. We may just need to run the scripts portion of the UI Policy and use that to do the showing and hiding. If you have screen shots that would be helpful.

I want to create a UI action button on the Incident/Service request based on the Subcategory and assignment group.

Condition 

If i select incident subcategory mailbox creation - UI action button should not appear

Once Incident assigned to correct queue ("Messaging' in my case). UI action button Mailbox creation should appear on the incident like below.

my requirement is once both condition match than only Mailbox creation button appear on the incident 

 

find_real_file.png

 

 

Hi Abhishek,

 

You need to follow blog. Seems you need to hide button without form load.

Hitesh Malgonda
Tera Contributor

Hello Abhishek,

please try below condition,

current.subcategory=='mailbox_update'&&current.assignment_group!='Messaging'

and write below code,

var items = $$('BUTTON').each(function(item){
   if(item.innerHTML.indexOf('Submit') > -1){
      item.hide();  
   }
});

Please mark as Correct Answer/Helpful, if applicable.

Regards,

Hitesh Malgonda.