To add an item/option in List context menu for scoped Application

Gulzar Manuja2
Kilo Guru

Hi All,

I am trying to do a task where I have to add an additional item (example: Sample Option) to the Configure option in Form context menu which appears after right-clicking the form header. I created a new UI Context Menu as shown below:

find_real_file.png

When I checked the available options by right clicking the list, this newly added item appeared in the menu as shown below:

find_real_file.png

Now the problem is when I added two additional conditions i.e. !ListProperties.isRelatedList() && !ListProperties.isRefList():

find_real_file.png

'Sample Option' is no longer present in the right click context menu as shown below:

find_real_file.png

These additional conditions work when I apply it on a global table. But I am trying to add this option on a scoped table/application. So I want to know if this !ListProperties.isRelatedList() && !ListProperties.isRefList() conditions work only on global tables ?? If yes, is there any way to apply these conditions on a scoped table.

Any help would be highly appreciated.

Note: Helsinki version is configured on my ServiceNow instance.

Thanks & Regards,

Gulzar Manuja

5 REPLIES 5

BALAJI40
Mega Sage

I guess it will work. May be check for the role of the user, or check for ANY OTHER condition it did not satiesfies.


  • !ListProperties.isRelatedList() part of the condition prevents this action from showing on up related lists.
  • !ListProperties.isRefList() part of the condition prevents this action from showing up on reference list popups.

Hi Balaji,



Thanks for your response !!!!



Actually that's what I did. I checked by giving only role condition and it was working fine as shown in the screenshot which I pasted in my question. As I want this option to be available only for the normal Lists view, not for Related List and Reference List, I added !ListProperties.isRelatedList() and !ListProperties.isRefList() one by one, and that option disappeared both times.



As per my understanding, !ListProperties.isRelatedList() and !ListProperties.isRefList() work fine for Global Tables/Applications but as it is not working in my case i.e. for scoped applications, it seems ListProperties doesn't work for scoped applications.



Just want to confirm if my understanding is correct. If yes, is there any other way I can provide these conditions in a scoped application ?



I hope it clarifies.



Thanks & Regards,


Gulzar Manuja


I have tested in My personal instance, its working. Check the below screenshots.


find_real_file.png



find_real_file.png


Hi Balaji,



Thanks for sharing the screenshots. I created a UI Context menu the same way you did but it's not working for me. I don't know why...