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
}
No comments:
Post a Comment