Skip to content

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

@wouterwp

Description

@wouterwp

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions