Page 1 of 1

[RDMLX]Offline External Invocation Handler

Posted: Mon May 01, 2017 6:11 pm
by MegumiSawada
Hi,

I have a requirement to invoke longrange offline form from URL.
I can fire up javascript via the target form's onload event to open offline form. However how can I get the inbound parameters from the URL?

I have found the following topic and it seems we were not able to pass a parameter to offline form at that time(on 2014).
http://longrange.lansa.com.au/viewtopic ... =260&p=661

Is it still not possible?

Best Regards,
Megumi Sawada

Re: [RDMLX]Offline External Invocation Handler

Posted: Tue May 02, 2017 8:47 am
by tsupartono
Megumi,

You can read the URL parameters from your offline form.

Here is how you pass parameters in the URL:

Code: Select all

longrange://performaction/?param,1=testvalue1&param,2=testvalue2
The above example pass 2 parameters (testvalue1 and testvalue2)

In your JavaScript code (the offline form's OnLoad handler), you read the parameters by invoking receiveVars:

Code: Select all

lrexec(
    function()
    {
        this.q_receiveVars("args");
    },
    function()
    {
        this.console(this.args[0]); // first argument = testvalue1
        this.console(this.args[1]); // second argument = testvalue2
    }
);

Re: [RDMLX]Offline External Invocation Handler

Posted: Tue May 02, 2017 4:50 pm
by MegumiSawada
Hi Tony,

I have been able to achieve what I would like to do based on you advice.
Thank you!!

Best Regards,
Megumi