London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

eCommerce 5.2 Cannot create contact in Turkish (Turkey)

Vote:
0

Hi all, I got an exception when creating contact in Turkish. Please see my sample code:

private void Add(CustomerContactModel contact, MembershipUser user)
{
var customerEpiserver = Mediachase.Commerce.Customers.CustomerContact.CreateInstance(user);

customerEpiserver.FirstName = contact.Firstname;
customerEpiserver.LastName = contact.Lastname;
customerEpiserver.Email = contact.EmailAddress;

// Assembly: Mediachase.Commerce, Version=5.2.628.0 & Mediachase.BusinessFoundation.Data, Version=2.4.3.0
customerEpiserver.SaveChanges();
//Exception: System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
}

Debugging I see the exception from "EvaluateGuid" function in Mediachase.BusinessFoundation.Data.Meta.DefaultValue class. The system tried to create default value (new guid) for CreatorId and ModifierId fields, but it failed.Please see the following screen-set for more details: 

You can see "if (string.Compare(field.DefaultValue, "NEWID()", true) == 0)" always return 'false' in Turkish culture (tr-tr). Therefore, line 114 is excuted => exception.

Could you please give me advise to fix this issue in this case (Turkish language - Mediachase.Commerce, Version=5.2.628.0)?

Many Thanks!

P/S: When I decompiled Mediachase.BusinessFoundation.Data, Version=10.8.0.0, I see that EpiServer already fixed this issue by using line of code
if (string.Compare(field.DefaultValue, "NEWID()", StringComparison.InvariantCultureIgnoreCase) == 0)

#201826
Edited, Mar 04, 2019 18:44
* 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.