- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2024 11:32 PM
Hi guys, I am trying to redirect the user to the order status page of the request that gets generated when I am submitting a Ui builder form, but after submission it goes to the order status page with an empty request number.
I am using a catalog client script and a script include to do the same.
Could anyone guide me on the possibility of redirecting the users dynamically using the two?
Thanks.
 
 
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-24-2024 05:24 AM
Hey @KedarB
I am not sure if this gonna work like what you said, but you can check this link below
Please accept the solution /mark this response as correct or helpful if it assisted you with your question.
Regards,
Animesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2024 05:35 AM
hi @KedarB
was the link usefull, if yes close the thread so that others will find it easy if they face the same thing.!!!
Please accept the solution /mark this response as correct or helpful if it assisted you with your question.
Regards,
Animesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2024 11:43 PM
Try using the below onSubmit client script to redirect to some url:
function onSubmit() {
var orderNumber = g_form.getValue('order_number');
var orderStatusURL = '/order_status_page.do?order_number=' + orderNumber; //whatever URL you want to make
window.location.href = orderStatusURL;
}
Let me know if this works or if you have any questions.
Thanks,
Brahmjeet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-24-2024 12:13 AM
Hi Brahmaraj, thanks for taking the time out,
the issue is that I am not able to fetch the latest request submitted by the current logged in user which is me in the script include and then calling the script include in the client script using scratchpad, but it doesnt seem to be working.
So I am looking for a solution on that, if you could please look into it and let me know.
Thanks,
Kedar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-24-2024 12:19 AM
could you please share the script include code because the image is not clear, i just want to see what is it that you are returning from script include and I don't think it will be all used.
Thanks,
Brahm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-24-2024 12:31 AM
Sure, here it is.
var redirecttorequestpage = Class.create();
redirecttorequestpage.prototype = Object.extendsObject(AbstractAjaxProcessor, {
build_url : function(request){
gs.info('kedar enter in script include');
var req_sysid = request;
//var req_url = gs.getProperty('glide.servlet.uri') + 'com.glideapp.servicecatalog_checkout_view_v2.do?v=1&sysparm_sys_id=' + req_sysid + '&sysparm_new_request=true&sysparm_view=ess&sysparm_catalog_view=catalog_default';
g_scratchpad.ba_rec_prod = req_sysid;
gs.info('kedar22' + g_scratchpad.ba_rec_prod);
return req_sysid;
//gs.setRedirect(req_url);
},
type: 'redirecttorequestpage'
});