Good morning,
I am trying to import vendor contact info (it might be primary or non primary)
if vendor contact info is already there(whether it is primary or non primary) then update with new data or insert.
i want that record to update old contact info with new contact info
// For primary i can use this
logisticsElectronicAddress = LogisticsElectronicAddress::findRecId(DirPartyTable::findRec(vendtable.Party).PrimaryContactPhone,true);
so with this i can get primary contact.
If that existing contact is not primary instead i have non primary contact i am able to get this in this way
LogisticsElectronicAddress lla ; select forUpdate firstOnly lla where lla.Location == DirPartyLocation::findOrCreate(vendtable.Party, 0).Location && lla.Type == LogisticsElectronicAddressMethodType::Phone;
I want to know am i doing correct or are there any methods ?
please provide any alternate solution.
Regards.
Have a great day.