PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 11/18/2014 5:12 PM by  mikeP
DME call and Javascript
 11 Replies
Sort:
You are not authorized to post a reply.
Page 1 of 3123 > >>
Author Messages
mikeP
Private
Private
Veteran Member
(407 points)
Veteran Member
Posts:151


Send Message:

--
11/17/2014 2:29 PM

    I’ve trying to create a mobile inbasket display exec html file using the example provided by Lawson.  The example displays requisitions, I want to display purchase orders.

     

    We’re on environment 9.0.12.

     

    The example has a function that makes a DME call to retrieve a requisition header, a second function that retrieves requisition lines, and a third that constructs html code using data retrieved in the first two functions, and writes it using mainFrame1.document.write().

     

    The example as it was delivered displays requisitions properly, but I’m having problems with my purchase order version: I don’t see how the program flow works.

     

    The first function in the example, GetReqHdrInfo(), looks like this:

     

        logancall.out = "JAVASCRIPT"

        logancall.field ="item;description;quantity;entered-uom;unit-cost"

        logancall.index = "rlnset1"

        logancall.max = "250"

        logancall.xida = true

        logancall.key   =   m_Company + "=" +  m_ReqNumber

        logancall.func = "displayRecSum()"

        DME(logancall, "REQLINE")

    }

     

    From what I can see, the only way the second function , displayRecSum(), is ever called is by its presence as the “func” parameter in GetReqHdrInfo.  However, in my code, the corresponding displayPoSum() is never called.  (I use multiple document.write statements to trace the program flow.)

     

    First point of confusion is this statement in the documentation, Doc for Developers: IOSApplication ProgramInterfaces—Windows:

     

    “Release 8.0 supported the following values for calls to DME which are no longer in 9.0.x calls to Data.”, and it goes on to list several values, including “.FUNC” .

     

    I’ve also read that “OUT=Javascript” is no longer used in at least one post here are the forum.  So for starters, it appears that the provided example is using obsolete syntax. 

     

    The real problem is that my .func displayPoSum() is not called.

     

    Does anyone have any advice on how to go about debugging this issue?

     

     

     

    Judy Consoli
    Private
    Private
    Veteran Member
    (107 points)
    Veteran Member
    Posts:43


    Send Message:

    --
    11/17/2014 2:39 PM


    The ReqHeader function should call the reqline function the reqline function should be changed to call your po function and then your po function should call the display RecSum.



    mikeP
    Private
    Private
    Veteran Member
    (407 points)
    Veteran Member
    Posts:151


    Send Message:

    --
    11/17/2014 3:00 PM

    Thanks Judy. That's essentially how I've written it.

    The issue is that it never "returns" from the first DME call.  I have document.write statements before and after the call, as well as in my GetPoDtlInfo function.  It never gets to the GetPoDtlInfo function, or the line immediately after the DME call.

    Judy Consoli
    Private
    Private
    Veteran Member
    (107 points)
    Veteran Member
    Posts:43


    Send Message:

    --
    11/17/2014 3:06 PM

    Can you send me your code.  I did basically the same thing.

     

    judyconsoli@Carolina.rr.com

    Judy Consoli
    Private
    Private
    Veteran Member
    (107 points)
    Veteran Member
    Posts:43


    Send Message:

    --
    11/17/2014 3:30 PM
    also - do you have fiddler installed on your desktop and if so have you turned it on to see the calls?
    You are not authorized to post a reply.
    Page 1 of 3123 > >>