Showing posts with label LinkedIn. Show all posts
Showing posts with label LinkedIn. Show all posts

How to get Vendors or Customer Contact Information Primary & None Primary




 How to get Vendors or Customer  Contact Information Primary & None Primary



Via below code you can get the Vendor/Customer complete contact information (Primary & None Primary).

  LogisticsElectronicAddress logisticsElectronicAddress;
        DirPartyLocation        dirLocation;
        DirPartyTable dirPartyTable=DirPartyTable::findRec(VendTable::find("S00038").Party);
     
        while select  logisticsElectronicAddress
        join dirLocation  where dirLocation.Location==logisticsElectronicAddress.Location
            && dirLocation.Party==dirPartyTable.RecId
        {
            info(strFmt("%1",logisticsElectronicAddress.Locator));
        }

How to get Vendors or Customer Primary Contact Information




How to get Vendors or Customer Primary Contact Information

Via below code you can get the Vendor/Customer complete contact information.

Important 
In AX 2012 PrimaryContactLinkedInPrimaryContactFacebook fields are not available.

class SLD_DemoInstance
{
   
    public static void main(Args _args)
    {

        LogisticsElectronicAddress logisticsElectronicAddress;
        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));
        }
    }


}




Virtual Fields Vs Computed Fields

  Virtual Field: A virtual field in D365FO is a field that doesn't have a direct representation in the database. It's a field that y...