How to get Vendors or Customer Contact Information
Views (1047)
How to get Vendors or Customer Contact Information
Via below code you can get the Vendor/Customer complete contact information.
Important
In AX 2012 PrimaryContactLinkedIn & PrimaryContactFacebook fields are not available.
class SLD_DemoInstance
{
public static void main(Args _args)
{
LogisticsElectronicAddresslogisticsElectronicAddress;
DirPartyTable dirPartyTable=DirPartyTable::findRec(VendTable::find("K-DR-000001").Party);
while select logisticsElectronicAddress where (logisticsElectronicAddress.RecId == dirPartyTable.PrimaryContactEmail ||
logisticsElectronicAddress.RecId == dirPartyTable.PrimaryContactPhone || logisticsElectronicAddress.RecId == dirPartyTable.PrimaryContactFacebook ||
logisticsElectronicAddress.RecId == dirPartyTable.PrimaryContactFax || logisticsElectronicAddress.RecId == dirPartyTable.PrimaryContactLinkedIn)
{
info(strFmt("%1",logisticsElectronicAddress.Description));
}
}
}
This was originally posted here.
*This post is locked for comments