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 on B2CContactProcess Flow when changing Account Record Type Developer Name #127

Closed freytagt closed 2 years ago

freytagt commented 2 years ago

Describe the bug An Error on B2CContactProcess Flow is occurring when changing the "Account Record Type Developer Name" in the Custom Metadata Type "B2C CRM Sync Configuration Settings" to a custom value.

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..

The developer help page says it is because: "You can't combine a person account record type change with any other field update."

We didn't change anything in the flows, so how do we set a custom record type?

To Reproduce Steps to reproduce the behavior:

  1. Go to Custom Metadata Types > B2C CRM Sync Configuration Setting
  2. Click on Manage Records @ B2C CRM Sync Configuration Settings
  3. Edit Default Configuration
  4. Edit Account Record Type Developer Name to Custom value

Expected behavior The Flow B2CContactProcess shouldn't get an error on recCreate_ParentB2CAccount.

nek4life commented 2 years ago

@freytagt are you using PersonAccounts and trying to set a custom record type? There is a pull request here https://github.com/SalesforceCommerceCloud/b2c-crm-sync/pull/114 I haven't had time to verify with my current ongoing project, but this adds a separate piece of metadata to allow a custom mapping for PersonAccount types.

jbachelet commented 2 years ago

Hello, Thanks for opening an issue here.

Thanks @nek4life to jump on this and provide the link to the PR!

@freytagt were you able to identify if the PR was solving your issue? Thanks!

freytagt commented 2 years ago

Hey everyone,

thanks for the support - I hardcoded my custom record type into the flow which was working as well. But the PR seems so solve the issue as well :)