static void Job1(Args _args)
{
LogisticsElectronicAddress LogisticsElectronicAddress;
CustTable CustTable;
DirPartyContactInfoView contactInfo;
DirPartyPostalAddressView postalAddress;
DirParty dirParty;
DirPartyPostalAddressView dirPartyPostalAddressView;
DirPartyContactInfoView dirPartyContactInfo;
CustTable = CustTable::find("LOL-000002");
info(strfmt("%1",CustTable.email()));
info(strfmt("%1",CustTable.address()));
ttsBegin;
try
{
dirParty = DirParty::constructFromCommon(CustTable);
dirPartyPostalAddressView.LocationName ='HeadQuarters ';
dirPartyPostalAddressView.City ='chennai';
dirPartyPostalAddressView.Street ='4th Avenue';
dirPartyPostalAddressView.StreetNumber ='18';
dirPartyPostalAddressView.CountryRegionId ='IND';
// dirPartyPostalAddressView.State ='SP';
dirParty.createOrUpdatePostalAddress(dirPartyPostalAddressView);
dirPartyContactInfo.LocationName ='SouthStreet Contact Phone';
dirPartyContactInfo.Locator ='9600147034';
dirPartyContactInfo.Type = LogisticsElectronicAddressMethodType::Phone;
dirPartyContactInfo.IsPrimary = NoYes::Yes;
// Fill Contacts
dirParty.createOrUpdateContactInfo(dirPartyContactInfo);
info("address created ");
// Marks the end of transaction.
ttsCommit;
}
catch(Exception::Error)
{
ttsAbort;
throw Exception::Error;
}
}
{
LogisticsElectronicAddress LogisticsElectronicAddress;
CustTable CustTable;
DirPartyContactInfoView contactInfo;
DirPartyPostalAddressView postalAddress;
DirParty dirParty;
DirPartyPostalAddressView dirPartyPostalAddressView;
DirPartyContactInfoView dirPartyContactInfo;
CustTable = CustTable::find("LOL-000002");
info(strfmt("%1",CustTable.email()));
info(strfmt("%1",CustTable.address()));
ttsBegin;
try
{
dirParty = DirParty::constructFromCommon(CustTable);
dirPartyPostalAddressView.LocationName ='HeadQuarters ';
dirPartyPostalAddressView.City ='chennai';
dirPartyPostalAddressView.Street ='4th Avenue';
dirPartyPostalAddressView.StreetNumber ='18';
dirPartyPostalAddressView.CountryRegionId ='IND';
// dirPartyPostalAddressView.State ='SP';
dirParty.createOrUpdatePostalAddress(dirPartyPostalAddressView);
dirPartyContactInfo.LocationName ='SouthStreet Contact Phone';
dirPartyContactInfo.Locator ='9600147034';
dirPartyContactInfo.Type = LogisticsElectronicAddressMethodType::Phone;
dirPartyContactInfo.IsPrimary = NoYes::Yes;
// Fill Contacts
dirParty.createOrUpdateContactInfo(dirPartyContactInfo);
info("address created ");
// Marks the end of transaction.
ttsCommit;
}
catch(Exception::Error)
{
ttsAbort;
throw Exception::Error;
}
}
No comments:
Post a Comment