Over the last month or two I’ve been doing some H5 development work and had a proof of concept script that ended up with a significant amount of scope creep – this pushed me from using a H5 Script and moving to the H5SDK.
This in turn introduced the challenge of needing figure out how to launch the H5SDK application and also pass arguments to the H5SDK application.
I ended up using the bookmarks functionality but even then I had some challenges passing parameters in to my application – and this was related to the order of passing the arguments.
name: the name that we want for the tab (this has some inconsistent behaviour between the classic UI and the modern UI – spaces should be URL Encoded – so a space should be %20
program: the url that you see in the H5 Administration window for the H5SDK
mforms://bookmark?name=<name for the tab>&program=/mne/apps/<h5sdk deployed name>?<parameters>
We would then retrieve the parameters using the HttpUtil.getParameter(<parameter name>)
So an example would be
mforms://bookmark?name=My%20Application&program=/mne/apps/myapplication?orno=123456789
And our H5SDK code would read the parameter like so:
let orderNumber : string = HttpUtil.getParameter(‘orno’);