The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Why is my UI Action not working?

Loren1
Giga Contributor

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.

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

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


View solution in original post

6 REPLIES 6

Shishir Srivast
Mega Sage

Can you please try with this goToAssetList() in Onclick field


Thank you that was my issue.


Loren1
Giga Contributor

Thank you, this worked too.


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.