Displaying UI Action only on related list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2015 03:30 AM
Hi,
I'm trying to create a client side UI action (List banner button) on a related list. The button is visible on the related list, but the issue is that the button appears in the default list view of the table also.
I tried to restrict the UI Action visibility by using the condition "g_form.getTitle() == relatedListName" in the condition field. However, the UI Action is displayed even when the condition evaluates to false. Though i have made the UI Action as client side, I see "g_form.getTitle()" is not working in the condition field.
It would be much helpful if someone can suggest me a way to restrict the UI Action to be visible only on related list.
Thanks,
Udhay

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2015 03:45 AM
Hi Udhay,
By checking client check box - The UI action executes its script in the user's browser and on the server. When enabled, the Onclick field appears above the Condition field.
But conditions are always server side.
Please check this-
UI Actions | Creates the ability to choose a specific action such as clicking a button or a link. UI Actions put these items on forms and lists:
|
|
Thanks,
Tanaji

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2015 04:08 AM
I hope you can use getParentTable().
Check this link - http://wiki.servicenow.com/index.php?title=GlideList2_(g_list)#getRelated&gsc.tab=0

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2015 04:38 AM
Sorry the getParentTable() will not work.
Please use "RP.isOneToMany() || RP.isManyToMany()" in your condition.
This will make the condition true when it is used on related list and false when used on a default list view.
Hope this solves your problem
Please mark helpful/correct answer.
Thanks,
Tanaji

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2015 04:13 AM
Hi Udhay,
You use can use "List control" to restrict the UI action on related list.