function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Suhel CruiseSuhel Cruise 

Can I add ExternalId, a custom field, to any Standard Object ? Is there a limit ?

Hi,

1) I vaguely understand from the docs that it is possible to add ExternalId to majority of Standard objects. But still I would like to confirm.

2) https://help.salesforce.com/articleView?id=adding_fields.htm&type=0 suggests that only 800 Custom fields (My externalId field on an object will be budgeted against this limit I believe) can exist in an Org. These can be consumed by Custom Apps already installed in the Org as they create a lot of custom objects. Can someone confirm if there is truly such a limitation ?

Thanks,
Suhel
SwethaSwetha (Salesforce Developers) 
HI Suhel,
1. Yes, you can designate up to 25 External ID fields per object.

Considerations:
> External ID fields must be Custom text, number or email fields.
> If the Max Custom Indexes Per Entity limit has been reached, an External Id field cannot be created even if the Maximum number of External Ids and Unique fields per Entity limit has not been reached.

See related:  https://help.salesforce.com/articleView?id=000324871&type=1&mode=1

https://help.salesforce.com/articleView?id=000328519&mode=1&sfdcIFrameOrigin=null&type=1

2.External Id is made out of a field that is part of 800 custom fields.So the limit applies.

If you install a package from the AppExchange, its custom objects, custom fields, tabs, and apps don’t count against your edition’s allocation, but they do count against the total limit of your Salesforce org.

See https://help.salesforce.com/articleView?id=sf.faq_distribution_installing_why_do_the_custom.htm&type=5 for more details

Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you
Suhel CruiseSuhel Cruise
Thanks Swetha for your response and for the link on limit on custom fileds. It looks like the limit is per object.

I think I still need some more clarity on my first question. Can I possibly create one externalId field per object considering none of the objects have their custom field / other limits exhausted ? Is there any Object in Salesforce (Standard/Custom) that will not allow me to create an externalId field using API ?

Thanks,
Suhel
 
Suhel CruiseSuhel Cruise
Can someone possibly answer this ? I am unable to get clarity on this from documentation.