Источник:
http://d365technext.blogspot.com/201...r-primary.html
==============
How to get Vendor's or Customer's Contact Person's Contact Information
Via below code you can get the Vendor/Customer contact person and their complete contact information.
classSLD_DemoInstance
{
publicstaticvoid main(Args _args)
{
ContactPerson contactPerson;
DirPartyTable dirPartyTable;
LogisticsElectronicAddress address;
DirPartyLocation partylocation;
RecId _refRecId= VendTable::find("S00038").Party;
whileselect contactPerson
where contactPerson.ContactForParty==_refRecId
join dirPartyTable
where dirPartyTable.RecId==contactPerson.Party
join partylocation
where partylocation.Party==contactPerson.Party
outerjoin address
where address.Location==partylocation.Location
{
info(strFmt("%1, %2, %3",contactPerson.ContactPersonId,contactPerson.personName(),address.Locator));
}
}
}
Источник:
http://d365technext.blogspot.com/201...r-primary.html