Hi all, I have two services on checkout page, one ...
# suitecommerce
p
Hi all, I have two services on checkout page, one is the address service and other is my custom service. Both have ModelsInit functions, Address service has Function ModelsInit.customer.addAddress and my service has function ModelsInit.customer.updateProfile. Both are triggered at a common event on checkout page from different steps of checkout wizard, whichever completes later throws an error "Record has changed". The one that completes before the other throws no error. Is it because both are trying to modify customer record and if so how do I handle it. Please help!!!
v
This error is observed when one is trying to edit a record that was opened before it was edited by another source. I'm not sure if it is an ideal solution, but you can try to re-access the global customer CAPI object (nlapiGetWebContainer().getShoppingSession().getCustomer()) before you execute the updateProfile method and then call the method through the new object
p
@Viraj Shinde same issue persists even after re-accessing nlapiGetWebContainer().getShoppingSession().getCustomer()
v
I looked up and couldn't find a solution for you, I'm sorry. Someone else might be able to help.
s
I would recommend calling your custom service either before or after the built-in service, rather than at the same time