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

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


Anurag Tripathi
Mega Patron
Mega Patron

Hi Loren,



This works for me like a charm, try this



find_real_file.png


-Anurag