portalWnd.DataStorage not working

 3 Replies
 1 Subscribed to this topic
 12 Subscribed to this forum
Sort:
Author
Messages
TBonney
Veteran Member
Posts: 281
Veteran Member

    We recently migrated a DS form for PO20 that was created in portal version 9.0 to new environment that is version 10.11. After using the migration tool, it still doesn't work. The tool told us the following:

    inspecting script: /content/forms/po20.1_custom_tdbnew.xml
    - Processing XML nodes using "selectSingleNode()" in combination with ".text" may not work in all situations. Use the "DataStorage" object documented in the Object Viewer of Design Studio. - occurrences found: 9
    - Use the global "portalWnd.cmnDlg.messageBox(msg)" instead of "alert(msg)" - Reference the Object Viewer of Design Studio for details - occurrences found: 4

    We got the message boxes working, but were unable to find anything on any data storage object documention anywhere in the Object Viewer of Design Studio, nor find anythign useful anywhere else on the proper syntax for its usage.

    The issue is that the form just hangs. We have confirmed that the AGS call is working, but the subsequent useage of the data storage object to populate the desired field with data elements returned from the call is failing.

    Can anybody advise on the proper syntax to use this data storage object? Thank you in advance.

    Following is the block of code fomr the script that is failing:

    //window.open(sAGSCall);
         var sAGSInfo = portalWnd.httpRequest(sAGSCall);
         if (formState.agsError) return;
        //portalWnd.cmnDlg.messageBox("Displaying Test Message 1"
        ////////// portalWnd.cmnDlg.messageBox("text" DISPLAYS WORK UP TO THIS POINT! ///////////
        //THIS WORKS: portalWnd.cmnDlg.messageBox(sAGSCall)
        //AND SINCE WE GET A MESSAGE TO DISPLAY AFTER THE AGS ERROR EVALUATION, WE KNOW (OR AT LEAST BELIEVE) THE AGS CALL IS IN FACT WORKING WITHOUT ERROR!!

        //var sAcctNum = sAGSInfo.selectSingleNode("//VLO-VEND-ACCT".text;
        var sAcctNum = sAGSInfo.portalWnd.DataStorage("//VLO-VEND-ACCT".text;
              
                 if (!sAGSInfo || sAGSInfo.status > 400)
                 {
                    portalWnd.cmnDlg.messageBox("Page Not Found"
                     return;
                 }

                //var sFldNbr = sAGSInfo.selectSingleNode("//FldNbr".text;
                var sFldNbr = sAGSInfo.portalWnd.DataStorage("//FldNbr";
                  //var sMsgNbr = sAGSInfo.selectSingleNode("//MsgNbr".text;
                  var sMsgNbr = sAGSInfo.portalWnd.DataStorage("//MsgNbr";
                //var sMessage = sAGSInfo.selectSingleNode("//Message".text;
                var sMessage = sAGSInfo.portalWnd.DataStorage("//Message";
           
            if (sMsgNbr > "000"
            {
                portalWnd.cmnDlg.messageBox(sFldNbr + ", " + sMessage + ", " + sMsgNbr)
                        return;
            }
                   lawForm.setFormValue("text43",sAcctNum);

    Ragu Raghavan
    Veteran Member
    Posts: 476
    Veteran Member
      As part of the move from 9.x to 10.x, did you also have to move from IE to Chrome?
      TBonney
      Veteran Member
      Posts: 281
      Veteran Member

        We wnet form 9.01 to 10 in 2018 and used IE10 since. Our newest migration was form 10.05 to 10.11 and at this time we are moving to Chrome. With the versions we'll be on and the servers/databases we'll b using, I believe it has to be Chrome or Edge, but am not positive.

        Ragu Raghavan
        Veteran Member
        Posts: 476
        Veteran Member
          maybe this link will help
          https://www.lawsonguru.co...t/20367/Default.aspx