How to get Vendor's or Customer's Contact Person's Contact Information
Views (660)
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.
class SLD_DemoInstance
{
public static void main(Args _args)
{
ContactPerson contactPerson;
DirPartyTable dirPartyTable;
LogisticsElectronicAddress address;
DirPartyLocation partylocation;
RecId _refRecId= VendTable::find("S00038").Party;
while select contactPerson
where contactPerson.ContactForParty==_refRecId
join dirPartyTable
where dirPartyTable.RecId==contactPerson.Party
join partylocation
where partylocation.Party==contactPerson.Party
outer join address
where address.Location==partylocation.Location
{
info(strFmt("%1, %2, %3",contactPerson.ContactPersonId,contactPerson.personName(),address.Locator));
}
}
}
This was originally posted here.
*This post is locked for comments