How to update Contact Info (Email) for existing customer through DirPartyContactInfoView ? or any other suggested / working method.
You can use existing method, \Classes\DirParty\createOrUpdateContactInfo
CustomerEntity customerEntity;
CustTable custTable = CustTable::find(‘US-001’);
DirPartyContactInfoView contactInfoView;
customerEntity = new CustomerEntity(custTable, DirUtility::getCurrentDateTime());
contactInfoView.Party = custTable.Party;
contactInfoView.Type = LogisticsElectronicAddressMethodType::Email;
contactInfoView.IsPrimary = NoYes::No;
contactInfoView.Locator = ‘test@gmail.com’;
customerEntity.createOrUpdateContactInfo(contactInfoView);