static void UpdatePrimaryContact(Args _args)
{
DirPartyTable dirpartyTable;
LogisticsElectronicAddress electronicAddress;
CustTable custTable;
DirPartyLocation dirpartyLocation;
LogisticsLocation location;
;
while select custTable
//where custTable.AccountNum == "30008"
join dirpartyLocation
where dirpartyLocation.Party == custTable.Party
join location where location.RecId == dirpartyLocation.Location
&& location.IsPostalAddress == false
join electronicAddress
where electronicAddress.Location == location.RecId
{
dirpartyTable.ttsbegin();
dirpartyTable = DirPartyTable::findRec(custTable.Party,true);
dirpartyTable.PrimaryContactPhone = electronicAddress.RecId;
dirpartyTable.update();
dirpartyTable.ttscommit();
}
}
{
DirPartyTable dirpartyTable;
LogisticsElectronicAddress electronicAddress;
CustTable custTable;
DirPartyLocation dirpartyLocation;
LogisticsLocation location;
;
while select custTable
//where custTable.AccountNum == "30008"
join dirpartyLocation
where dirpartyLocation.Party == custTable.Party
join location where location.RecId == dirpartyLocation.Location
&& location.IsPostalAddress == false
join electronicAddress
where electronicAddress.Location == location.RecId
{
dirpartyTable.ttsbegin();
dirpartyTable = DirPartyTable::findRec(custTable.Party,true);
dirpartyTable.PrimaryContactPhone = electronicAddress.RecId;
dirpartyTable.update();
dirpartyTable.ttscommit();
}
}
No comments:
Post a Comment