Need to add two extra field on AP16.1

 9 Replies
 0 Subscribed to this topic
 12 Subscribed to this forum
Sort:
Author
Messages
Logini Maheswaran
New Member
Posts: 3
New Member
    In UI designer, I am modifying AP16.1 form. I want to add two extra fields into the screen and want to map it to a data source. I want to have field called “Hold code” and want to map it to VEN-HLD-CODE and field called “status” and map it to VEN-VENDOR-STATUS. Currently these two fields are not part of form AP16.1, therefore I can’t find them in the data source on the property panel. How do I do this?
    Ragu Raghavan
    Veteran Member
    Posts: 476
    Veteran Member
      Probably need DME/AGS calls to fetch and populate.
      Logini Maheswaran
      New Member
      Posts: 3
      New Member
        Thank you Ragu.

        Anyone has any document related to DME call ?
        Ragu Raghavan
        Veteran Member
        Posts: 476
        Veteran Member
          here is an example of a DME calll to the table PCODES that populates the screen field "text118"

          function Validate_RejReason()
          {
          // alert("Validate Reject Reason");
          var vCode = lawForm.getFormValue("select5",0);
          if (vCode != 1 && vCode != 2 && vCode != 3 && vCode != 4)
          {
          alert("Not a valid reason " + vCode)
          return false
          }
          var sPDL = portalWnd.oUserProfile.getAttribute("productline");

          var s = portalWnd.DMEPath;
          s += "?PROD=" + sPDL;
          s += "&FILE=PCODES";
          s += "&FIELD=CODE;DESCRIPTION";
          s += "&INDEX=PCOSET1";
          s += "&KEY=" + "RQ" + "=" + vCode;
          s += "&SELECT=" + "ACTIVE-FLAG=A";
          // s += "&SELECT=" + "EMP-APP=0";
          s += "&MAX=1";
          s += "&OUT=XML";
          // alert("s " + s);

          var sReturn=portalWnd.httpRequest(s);

          if (!sReturn || sReturn.status)
          {
          alert("status s " + sReturn.status);
          return true;
          }

          var vObjXML = new portalWnd.DataStorage(sReturn);
          var vRecords = vObjXML.document.getElementsByTagName("RECORD");
          // alert("vrecords " + vRecords.length + " " + vRecords.text);

          if (!vRecords || (vRecords.length == 0))
          {
          alert("Not a valid reason " + vCode)
          return false
          }

          var vCols = vRecords[0].getElementsByTagName("COL");
          var vDesc = vCols[1].firstChild.data;
          lawForm.setFormValue("text118",vDesc,0);


          return true;
          }
          David Williams
          Veteran Member
          Posts: 1127
          Veteran Member
            Logini,
            You can use a DME call to populate your fields but you would have to use an AGS call to the AP10 form in order to update them (if you allow them to be changed on your AP16 form). Is that what you are wanting to do?
            David
            David Williams
            Logini Maheswaran
            New Member
            Posts: 3
            New Member

              Thank you David, yes that is exactly what I want. What I am trying to get at is, if anyone changes the bank information for any vendor on AP16.1, I want to put a hold code and make the vendor status inactive on Ap10.1 until someone reviews the entry and approve it.

               

              We are very new to Design Studio, just purchased it two weeks ago so I don’t have much idea about DME call or AGS call. I have to find some manual and read them.

              Any suggestion on where I can get the documents?

              Ragu Raghavan
              Veteran Member
              Posts: 476
              Veteran Member
                John or somebody had put tothether some nice tutorials. I think it is still available somewhere in this site.
                I have a handout with examples of javascripting, handed out at an academy in CUE many years back. if you want a copy, email me
                raghavan@inform-alservices.com
                John Henley
                Posts: 3353
                  On Lawson support site. Get the design studio doc. Also one called "docs for developers".
                  Thanks for using the LawsonGuru.com forums!
                  John
                  David Williams
                  Veteran Member
                  Posts: 1127
                  Veteran Member
                    Send me your email to david@consultdavidw.com
                    David Williams
                    John Henley
                    Posts: 3353
                      Posted By ragu on 03/27/2012 09:35 AM
                      John or somebody had put tothether some nice tutorials. I think it is still available somewhere in this site.


                      Ragu, thanks for reminding me
                      See the section called "LAWSONGURU SERIES ON DESIGN STUDIO" on this page:
                      https://www.lawsonguru.co...BI/DesignStudio.aspx 
                      Thanks for using the LawsonGuru.com forums!
                      John