Data Service Call from htm

 2 Replies
 0 Subscribed to this topic
 17 Subscribed to this forum
Sort:
Author
Messages
ChuckM
Advanced Member
Posts: 24
Advanced Member
    I've been successful creating Data Service Calls and executing them from form scripts created in Design Studio.

    Now I'm trying to do the same from an htm file, and it blows up when it tries to execute the URL saying that portalWnd is not defined. (eg:

    var vDMEInfo = portalWnd.httpRequest(mDME)  I'm guessing this is because the script is not attached to a form.

    What would be the proper syntax to run the URL from an htm file?  Is there an example of this?

    TIA...ChuckM

    Judy Consoli
    Veteran Member
    Posts: 43
    Veteran Member
      Would this be what you are looking for


      ************************************************************/
      function GetReqHdrInfo()
      {
      if ( m_Company != '') {
      var logancall = new DMEObject(prodline, "REQHEADER")
      logancall.out = "JAVASCRIPT"
      logancall.field ="requester;req-location;req-del-date;nbr-lines;
      i-total;n-total;x-s-total;from-location;vendor-name;from-location;po-user-fld-5;
      dist-company;acct-unit;account;sub-acct"
      logancall.index = "rqhset1"
      logancall.key = m_Company + "=" + m_ReqNumber
      logancall.func = "GetReqUsrInfo()"
      logancall.xida = true
      DME(logancall, "REQHEADER")
      } else {
      alert("No variable setup for this workunit");
      close();
      }
      }
      ChuckM
      Advanced Member
      Posts: 24
      Advanced Member
        Thanks Judy...when I tried that format, I got an error that said "DMEObject is undefined". 

        But I played around with the URL format and finally got it to work.