Where to add action.setRedirectedURL(current) in client callable UI action.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2024 06:38 AM - edited 12-13-2024 07:15 AM
Hi all, My client callable UI action is being redirected to other page. I used action.setRedirectURL(current) but it is still being redirected to other page. Please refer below code.
function doIt() {
if (confirm("Are you sure")) {
//alert("You clicked yes");
gsftSubmit(null, g_form.getFormElement(), 'populate');
}
}
if (typeof window == 'undefined')
updateRecord();
function updateRecord() {
var inputs = {};
inputs['table_name'] = 'incident';
inputs['incident'] = current;
// Start Asynchronously: Uncomment to run in background.
sn_fd.FlowAPI.startFlow('global.Test Inc', inputs);
action.setRedirectURL("https://dev223110.service-now.com/incident.do?sys_id=57af7aec73d423002728660c4cf6a71c");
// Execute Synchronously: Run in foreground.
//sn_fd.FlowAPI.executeFlow('global.[internal name of flow]', inputs);
}
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2024 11:06 AM
The others have shown you THAT its a server side script, but not why.
The setredirect is in preparation for after the database transaction, and is thus not client side.