Perhaps this answer could help:
https://community.mendix.com/link/space/java-actions/questions/104006
Brian,
Here is an approach I used:
// This file was generated by Mendix Studio Pro.
//
// WARNING: Only the following code will be retained when actions are regenerated:
// - the import list
// - the code between BEGIN USER CODE and END USER CODE
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
// Other code you write will be lost the next time you deploy the project.
import "mx-global";
import { Big } from "big.js";
// BEGIN EXTRA CODE
// END EXTRA CODE
/**
* @returns {Promise.<string>}
*/
export async function GetRedirectURL() {
// BEGIN USER CODE
window.addEventListener('DOMContentLoaded', (event) => {
return window.location.href;
});
return window.location.href;
// END USER CODE
}
Hope that helps you get started,
Mike