- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2017 08:18 AM
I have created a new UI Action, the new button is appearing, but when I click on it nothing is happening.
Onclick field I have: goToAssetList
I have added a condition to have button only appear on 1 catalog item. This is working.
When they click on the button I want the Hardware Asset list to appear.
My script is:
function goToAssetList(){
window.location='alm_hardware_list.do';
}
Any advice would be greatly appreciated.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2017 08:21 AM
Hi Loren,
I wouldn't bother with a client UI action in this case. You can do this quite easily like this:
Name: HW list
Client: false
Condition: (some expression to tell when this button should appear)
Script:
action.setRedirectURL('/alm_hardware_list.do');
http://wiki.servicenow.com/index.php?title=UI_Actions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2017 08:20 AM
Can you please try with this goToAssetList() in Onclick field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2017 08:26 AM
Thank you that was my issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2017 08:27 AM
Thank you, this worked too.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2017 08:30 AM
Thank you Loren,
Please mark response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.