Sunday, July 2, 2023

Get customer multiple contact details in dynamics 365 F&O X++

     CustTable                       custTable;

     LogisticsElectronicAddress       logisticsElectronicAddress;

     DirPartyLocation                 dirLocation;

     DAX_ContactInformation           dAX_ContactInformation;

      DirPartyTable dirPartyTable = DirPartyTable::findRec('12345');

       while select dirLocation

           where dirLocation.party == dirPartyTable.RecId

       {

       while select  logisticsElectronicAddress

          where dirLocation.Location == logisticsElectronicAddress.Location

          

       {

           dAX_ContactInformation.Locator = logisticsElectronicAddress.Locator;

           dAX_ContactInformation.Description = logisticsElectronicAddress.Description;

           dAX_ContactInformation.LocatorExtension= logisticsElectronicAddress.LocatorExtension;

           dAX_ContactInformation.Type             = logisticsElectronicAddress.Type;

           dAX_ContactInformation.insert();

   

          

       }

}

        

No comments:

Post a Comment

My Requirement is Delete option in Vendor Master for all roles except System Administrator

   [FormControlEventHandler(formControlStr(VendParameters, VendParameters_YNV_VendorMasterDeletionOption), FormControlEventType::Modified)] ...