Wednesday, March 27, 2019

AX 2012 R3 CU13 - Error on POS launch - LSRetailPosis.POS.Program: System.NullReferenceException: Object reference not set to an instance of an object.


After upgrading AX 2012 R3 to CU13 and above, POS launch may fail with the following error :

LSRetailPosis.POS.Program: System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.Dynamics.Retail.Pos.DataManager.CustomerDataManager.ConvertToTransactionalCustomer(Customer axCustomer)
   at LSRetailPosis.BusinessLogic.CustomerSystem.GetCustomerInfo(String customerId)
   at Microsoft.Dynamics.Retail.Pos.Tax.TaxEngine.TaxEngineServiceProxy..ctor(IApplication application)
   at Microsoft.Dynamics.Retail.Pos.TaxService.Tax.Initialize()
   at Microsoft.Dynamics.Retail.Pos.SystemCore.Services.Initialize()
   at Microsoft.Dynamics.Retail.Pos.SystemCore.PosApplication.Initialize().


The reason is the default customer attached to the Retail store (Retail module -> Common > Retail Channels> Retail stores > Customer group in General tab) does not have an address book assigned to it. If it is so, you may want to run Customer distribution schedule job (1010) to replicate the customer to the POS for the error to be fixed. The job can be found in Retail module > Setup >Retail scheduler > Channel integration > Channel database > Select store > Full data sync (choose 1010). Once the job is applied (Retail > Inquiries > Download sessions > see the status field regularly until applied).