Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

CustomerContext.GetCustomerContact creates new contact


The problem in user Register / Login scenario is as following.

I'm able to register and login user, but after CustomerContext.CurrentContact is called, there is a new entry in the cls_Contact with the following data changes:

  • UserId is changed from Guid to 'String:<emailaddress>', e.g. ""
  • Email becomes empty
  • FullName is email address now (was the actual name)
  • LastName becomes empty
  • FirstName is email address now (was the actual name)
  • All other data (except Ids and Modified/Created date) becomes NULL / default values

The question: How can I fix that? Should I explicitly set UserId to something like "String:<emailaddress>"? If so, how can I do that?

Aug 31, 2022 12:43

Aha, I see the FoundationContact now:

// The UserId needs to be set in the format "String:{email}". Else a duplicate CustomerContact will be created later on.
public string UserId
get => Contact.UserId;
set => Contact.UserId = $"String:{value}";
Aug 31, 2022 12:56
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.