Tuesday, November 12, 2024

Get address through code

Get all address of customer:-    

  CustTable                   customertableloc; 

  DirPartyTable               dirpartytableloc;  

 DirPartyLocation             dirPartyLocation; 

  LogisticsLocation            logisticsLocation;  

 Logisticspostaladdress      logisticspostaladdressloc;  


          customertableloc=CustTable::find("US-006"); 

  select dirpartytableloc    where customertableloc.Party == dirpartytableloc.RecId;

while   select dirPartyLocation  where dirPartyLocation.Party==dirpartytableloc.RecId    

          join      logisticsLocation where dirPartyLocation.Location==logisticsLocation.RecId    

   join     logisticspostaladdressloc    where logisticspostaladdressloc.Location == logisticsLocation.RecId  

{

     if(logisticspostaladdressloc.Address)   

      {       

          Info(strFmt("%1 ,%2", customertableloc.AccountNum,logisticspostaladdressloc.Address));   

      }

 }


Get Requester by Purchid through code :-


PurchTable purchTable ;

HcmWorker  hcmWorker;

DirPerson  dirPerson;

DirPartyTable dirPartyTable;


Select purchTable where purchTable.PurchId=="000006"

     join hcmWorker where hcmWorker.RecId==purchTable.Requester

     join dirPerson where dirPerson.RecId == hcmWorker.Person

     join dirPartyTable

     where dirPartyTable.RecId == dirPerson.RecId;

Info(strfmt("%1",dirPartyTable.Name));


No comments:

Post a Comment

Upload File from local system in a form

 Actions to be done at 3 stages  1) Create Fileupload item by right clicking on design as shown in image below 2)Change Properties especiall...