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