1

In a BeforeUpsert Flow for Accounts, I want to update the RecordTypeId from a PersonAccount RecordTypeId to a BusinessAccount RecordTypeId, depending on a Picklist Value on the Account Object. According to following Link it should work fine and also it did work fine when testing it via Apex. (Link: https://help.salesforce.com/s/articleView?id=000323364&type=1)

In debug mode the Flow also works fine, just as I expect it to. However, when activating the Flow and doing changes in the System I get the following error:

  • Record Type ID: value not valid for the entity: PersonAccount

What can be the reason for the error and can I avoid it?

The Flow: Picture of the Flow

3
  • 2
    Welcome to SFSE! Please take a moment to read How to Ask and take the tour. Including a Minimal, Reproducible Example would be helpful, a verbal description of an issue is not enough.
    – identigral
    Commented Jul 19, 2022 at 15:58
  • 1
    What would be particularly helpful to see (screenshot of part of your flow?!) is how your flow is getting and setting the RecordTypeId. Commented Jul 19, 2022 at 19:28
  • Hello, thanks a lot for your help. I will also include a minimal reproducible example. Regarding this question, I found out, that my problem was the field company on the Lead object, which was not filled and caused the Account from Conversion to be of Type Person Account. When filling the field company with a value ( only in case of business account), it worked.
    – Gerke
    Commented Jul 20, 2022 at 12:51

1 Answer 1

0

My mistake was that I did not fill the field Company on the Lead Object, so Salesforce was trying to create a PersonAccount during Lead Conversion. When filling the field company with a value (only in case of business account), it worked.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .