SalesforceLabs / OrgCheck

Org Check is an easy-to-install and easy-to-use Salesforce application in order to quickly analyze your org and its technical debt.
MIT License
126 stars 28 forks source link

Person Account Custom fields ignored #71

Open vaumont opened 3 years ago

vaumont commented 3 years ago

In an org with Person Account enabled:

1) create a xyzc custom field on the Contact object Salesforce automatically creates a xyzpc field on the Account object

OrgCheck does not report on the __pc field.

2) On the account object, create an abc__c formula fields that references the Account.xyz___pc field

image

VinceFINET commented 3 years ago

On the "Objects" tab, I can see the Person Account field on the Account object image

And the DAPI is showing this for this field: image

VinceFINET commented 3 years ago

Effectively on the "Custom Fields" tab, i cannot see the same on the account object. i see only the field on Contact image

VinceFINET commented 3 years ago

The following query from Tooling API is not showing the pc field

SELECT Id, TableEnumOrId, DeveloperName, NamespacePrefix
FROM CustomField 
WHERE TableEnumOrId = 'Account'
AND DeveloperName = 'xyz_test'

I found the field if I change the statement with TableEnumOrId = 'Contact'

My assumption is that Tooling API does show up the pc fields. I will investigate internally.

VinceFINET commented 3 years ago

pushing this feature to future release as it may means to refactor from tooling to metadata api...