Find your content:

Search form

You are here

External ID & Unique field limit exceeded


We have a customer whom is experiencing this exception: External ID & Unique field limit exceeded. when they attempt to install our package.

I assume this is related to a conflict with another package that overrides that has added some extern ID & unique Ids to the same objects that we do.

The user can increase this limit from Salesforce. If they do, however, I need to figure out which object's our package adds a custom field too that is defined as a unique or external ids right?

However, our package doesn't add any external id & unique id fields to objects unless I'm misunderstand them: We have some look-up relationships to Leads and Contacts (is that considered part of the limit on External Id & Unique Ids)?

If so: is there anyway anyone can think of that would display which fields are contributing to toward this limit on an object by object basis?


In reading more about the customers limit, it strikes me that they are having an issue with an org wide external id limit of 10? Is the limit org wide?

Attribution to: jordan.baucke

Possible Suggestion/Solution #1

It would be really weird to have lookups silently count as ext. id fields...

Try performing describe calls on all objects in your package that you suspect to clash? I have a custom field marked as "External Id", "Unique Case Insensitive" and I get this:

Schema.DescribeFieldResult f = Account.Account_Number__c.getDescribe();
System.debug(f.isExternalID());  // true
System.debug(f.isUnique());      // true
System.debug(f.isIdLookup());    // true

EDIT: There are 3 unique / ext. id fields per object. Ask support for increase.


How many formulas do you have on the objects that can be "common" with the other package. And do these formulas utilize in total 10 lookups to different places? (scroll to "Formulas: Number of Unique Relationships Per Object" text)?

I can imagine this being different kind of limit (put in place because too many lookups / formulas make joins in the underlying database extra painful to retrieve data). In that case you might have to consider rewriting some of your lookups into fields updated with triggers (always pain in managed package as I understand).

Attribution to: eyescream

Possible Suggestion/Solution #2

The max number of external id fields applies on a per object basis. It is a 'black tab' though, so if they cite a convincing enough reason to salesforce support, they should be able to have this limit bumped for them.

Attribution to: techtrekker
This content is remixed from stackoverflow or stackexchange. Please visit

My Block Status

My Block Content