2

I inherited an org that has person accounts enabled. (boo, hiss.)

The team is currently using sandboxes and org-based development. (boo, hiss.)

I was finally able to pull all? the metadata from production with the help of a custom script.

However, it appears no combination of sfdx or sf will pull person account fields (*__pc). For instance. We've got a field called 'Member Status' on contact that is accessed throughout the codebase via Account.member_status__pc.

I've tried: sf retrieve metadata -m CustomObject (side note, this doesn't pull Account at all.) sfdx force:source:retrieve -m CustomObject

Am I missing something, or early on the learning curve for person accounts? Anyone one have any work-arounds?

1 Answer 1

2

Like the classic metadata API, CustomObject only pulls, well, custom objects, by default. To get a standard object, you have to ask for it.

sfdx force:source:retrieve -m CustomObject:Account,Profile,Settings:Account

This will grab all the Account fields, list views, record types, etc, the field level security for all those fields, and the Account Settings. You can add page layouts if you need those as well.

1
  • Unfortunately, this still does not pull the __pc field definitions. :(
    – Kevin P
    Oct 26, 2022 at 23:31

You must log in to answer this question.

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