This is code to  update customer phone number on AX2012 R2. You can check this code through simple small job.    DirPartyPhoneNoView PhoneNo;    ContactPerson contactperson;    CustTable custTable;    custTable = CustTable::Find("C45102");    PhoneNo = PhoneNo::find(custTable.Party);    PhoneNo.Locator = '6567767657';    PhoneNo.Type = LogisticsElectronicAddressMethodType::Phone;    PhoneNo.IsPrimary = true;    contactPersonEntity.createOrUpdatePhoneNo(PhoneNo);     
Technical Tutorials x++,tips on issues or troubleshooting On Ax ERP ,Microsoft Dynamics 365,Ax 2012,Microsoft , U.S.,Business Software solution.