- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2019 06:41 AM
Hi,
I have a 'Client' UI Action with this script:
function createLogTechComp(){
gsftSubmit(null, g_form.getFormElement(), 'sysverb_propose_new_logical_tech_comp');
}
if(typeof window == 'undefined') {
var item = 'c48b73f03749738005d41a7943990e8b';
var url = 'com.glideapp.servicecatalog_cat_item_view.do?sysparm_id=' + item +'';
action.setRedirectURL(url);
}
If set as a 'Form button' as expected it redirects to the Catalog Item.
However, if I change it to a 'List Banner Button' nothing happens.
How do I get a UI Action set to 'List Banner Button' to redirect?
Can't I use action.setRedirectURL ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2019 07:05 AM
Is there a particular reason you have Client checked? g_form doesn't exist on a list view, so any part of the client side scripting will fail. It's probably never getting to the server side (check your browser console to verify).
If you just put the server side in the script and uncheck Client, it should work.
var item = '38c1fc840a0a0b2700285921c2bf5fc8';
var url = 'com.glideapp.servicecatalog_cat_item_view.do?sysparm_id=' + item +'';
action.setRedirectURL(url);
Note: Normally, there is a message that appears when you don't have any records selected that would say something like "no records selected." This is suppressed when your UI Action name starts with "sysverb_" but it looks like you have already addressed that aspect.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2019 07:05 AM
Is there a particular reason you have Client checked? g_form doesn't exist on a list view, so any part of the client side scripting will fail. It's probably never getting to the server side (check your browser console to verify).
If you just put the server side in the script and uncheck Client, it should work.
var item = '38c1fc840a0a0b2700285921c2bf5fc8';
var url = 'com.glideapp.servicecatalog_cat_item_view.do?sysparm_id=' + item +'';
action.setRedirectURL(url);
Note: Normally, there is a message that appears when you don't have any records selected that would say something like "no records selected." This is suppressed when your UI Action name starts with "sysverb_" but it looks like you have already addressed that aspect.