BUG - WHY does updating UserInfo clear CustomerPhone on Customer Table

Matthew Butler asked on October 11, 2022 12:17

I'm updating a token field on a UserInfo record and its clearing the CustomerPhone record on the Customer table. Any ideas??

Correct Answer

Matthew Butler answered on October 11, 2022 12:39

User Sync applies UserInfo.TYPEINFO.Events.Update.After

but Customers only sync if you use the SetCustomerInfo, not .Set

public static void SetCustomerInfo(CustomerInfo customerObj)
{
  AbstractInfoProvider<CustomerInfo, CustomerInfoProvider,          ObjectQuery<CustomerInfo>>.ProviderObject.SetCustomerInfoInternal(customerObj);
  CustomerInfoProvider.SynchronizeUser(customerObj);
}

So I've added a module with a Customerinfo update event

0 votesVote for this answer Unmark Correct answer

Recent Answers


Matthew Butler answered on October 11, 2022 12:33

So it looks like saving UserInfo updates customer, but not the other way round. :(

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.