while select * from electronicAddress
join logisticslocation where logisticslocation.ParentLocation ==TMSCarrierLogisticsLocationloc.Location
&& logisticslocation.RecId == electronicAddress.Location && electronicAddress.IsPrimary == true// NoYes::Yes;
{
ttsbegin;
logisticsElectronicAddressloc = LogisticsElectronicAddress::findPrimary(electronicAddress.Location,electronicAddress.type);
if(logisticsElectronicAddressloc.Locator)
{
if( logisticsElectronicAddressloc.type == LogisticsElectronicAddressMethodType::Phone)
{
tmscarrier.MV2TelephoneNumber = logisticsElectronicAddressloc.locator;
}
if(logisticsElectronicAddressloc.type == LogisticsElectronicAddressMethodType::Fax )
{
tmscarrier.MV2FaxNumber = logisticsElectronicAddressloc.locator;
}
}