In this example I will be showing you how to get a customer contact details like phone num, email, fax and URL's.
Here, I'm inserting the data in my contract class to use in my API classes. Pleases change it according to your requirement.
dirPartyLocation.clear();
dirParty = DirPartyTable::findRec(custTable.Party);
while select dirPartyLocation where dirPartyLocation.Party == dirParty.RecId
join logisticsElectronicAddress
where logisticsElectronicAddress.Location == dirPartyLocation.Location
{
ContactContract = new ContactContract();
LogisticsElectronicAddressMethodType logisticsElectronicAddressMethodType = logisticsElectronicAddress.Type;
logisticsLocation.clear();
logisticsLocation = LogisticsLocation::find(dirPartyLocation.Location);
ContactContract.parmDescription(logisticsLocation.Description);
ContactContract.parmIsPrimary(logisticsElectronicAddress.IsPrimary);
ContactContract.parmLocator(logisticsElectronicAddress.Locator);
ContactContract.parmType(enum2Str(LogisticsElectronicAddressMethodType));
LogisticsElectronicAddressRole logisticsElectronicAddressRole;
select * from logisticsElectronicAddressRole where logisticsElectronicAddressRole.ElectronicAddress == logisticsElectronicAddress.RecId;
logisticsLocationRole = LogisticsLocationRole::findRec(logisticsElectronicAddressRole.LocationRole);
if(logisticsElectronicAddressRole)
{
ContactContract.parmPurpose(enum2Str(logisticsLocationRole.Type));// Type Invoice, business, home etc
}
Here, I'm inserting the data in my contract class to use in my API classes. Pleases change it according to your requirement.
dirPartyLocation.clear();
dirParty = DirPartyTable::findRec(custTable.Party);
while select dirPartyLocation where dirPartyLocation.Party == dirParty.RecId
join logisticsElectronicAddress
where logisticsElectronicAddress.Location == dirPartyLocation.Location
{
ContactContract = new ContactContract();
LogisticsElectronicAddressMethodType logisticsElectronicAddressMethodType = logisticsElectronicAddress.Type;
logisticsLocation.clear();
logisticsLocation = LogisticsLocation::find(dirPartyLocation.Location);
ContactContract.parmDescription(logisticsLocation.Description);
ContactContract.parmIsPrimary(logisticsElectronicAddress.IsPrimary);
ContactContract.parmLocator(logisticsElectronicAddress.Locator);
ContactContract.parmType(enum2Str(LogisticsElectronicAddressMethodType));
LogisticsElectronicAddressRole logisticsElectronicAddressRole;
select * from logisticsElectronicAddressRole where logisticsElectronicAddressRole.ElectronicAddress == logisticsElectronicAddress.RecId;
logisticsLocationRole = LogisticsLocationRole::findRec(logisticsElectronicAddressRole.LocationRole);
if(logisticsElectronicAddressRole)
{
ContactContract.parmPurpose(enum2Str(logisticsLocationRole.Type));// Type Invoice, business, home etc
}
In Dynamics 365, you can retrieve multiple customer contact details using advanced find, custom views, or Power Automate for seamless data extraction proton ge ensures efficient integration, enhancing data accessibility and workflow automation.
ReplyDelete