Server Side UI Action Redirects away from current record

KScoble
Tera Expert

Hi,

I am currently working on executing a UI Action to call a sub flow from flow designer.
Everything is working, except when you click the button it then redirects the user back to the
change_request.list table view.

Is there any way I can make it remain on the current record when a user selects the button?

Current Function is as follows:

(function() {
	try {
		var inputs = {};
		inputs['changeno'] = current;
		var result = sn_fd.FlowAPI.getRunner().subflow('global.testflowcalling').inForeground().withInputs(inputs).run();
		var outputs = result.getOutputs();
	
	} catch (ex) {
		var message = ex.getMessage();
		gs.error(message);
	}
})();


 

KScoble_0-1679872090305.png

 

1 ACCEPTED SOLUTION

KScoble
Tera Expert

Got this to work, Just added:
action.setRedirectURL(current);

View solution in original post

2 REPLIES 2

ChuckAtTyler
Mega Expert

Hello, 

 

After the try catch statement add the following:

 

action.setRedirectURL(current);

 

This will redirect the browser to the current record after it’s completed the script.


Let me know if that works for you!

Thanks,

Charles

 

KScoble
Tera Expert

Got this to work, Just added:
action.setRedirectURL(current);