SalesforceCommerceCloud / b2c-crm-sync

... a contemporary perspective on how to integrate B2C Commerce and the Salesforce Customer 360 Platform to power frictionless customer experiences in the B2C domain.
https://salesforcecommercecloud.github.io/b2c-crm-sync/
BSD 3-Clause "New" or "Revised" License
65 stars 45 forks source link

[BUG] Error when creating Person Account: INVALID_FIELD_FOR_INSERT_UPDATE: Unable to create/update fields: Name #267

Open wouterwp opened 3 months ago

wouterwp commented 3 months ago

Describe the bug The "B2C Commerce: Process: Create Or Update Contact" flow first tries to create an Business Account record, then a Contact record, and then tries to convert these to a Person Account. Since we have some custom validation rules for Business Accounts the Account creation failed. To work around that we changed the "Account Record Type Developer Name" in the "B2C CRM Sync Configuration Settings" to "PersonAccount". But then this flow resulted in this error:

Error element recCreate_ParentB2CAccount (FlowRecordCreate). This error occurred when the flow tried to create records: INVALID_FIELD_FOR_INSERT_UPDATE: Unable to create/update fields: Name. Please check the security settings of this field and verify that it is read/write for your profile or permission set.

To Reproduce Steps to reproduce the behavior:

  1. Go to Setup > Custom Metadata Types > B2C CRM Sync Configuration Settings > Default > Edit and change "Account Record Type Developer Name" to "PersonAccount", and Save.
  2. Place a new order on the B2C storefront, using an email address that does not yet exist for any account.
  3. This will result in the error mentioned above.

Expected behavior The person account is created successfully.