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
Brian11Brian11 

How do you deal with field limits on a manage package

We were wondering whether ISV Apps' custom fields on standard objects would count against the org limits of organizations that download our application. Most of the sources we found online seem to indicate that our custom fields will not count. However, I read this Salesforce help article and it specifically says 
if the package uses other types of custom components, such as custom fields, they count against the relevant limits of your Salesforce edition.

https://help.salesforce.com/articleView?id=faq_distribution_installing_why_do_the_custom.htm&type=0

Is there a good practice for dealing with such problem?
 
NagendraNagendra (Salesforce Developers) 
Hi Brian,

Sorry for this issue you are facing.

Custom fields created post-installation, those that do not have a namespace, are counted normally towards that object's limit. As an example, let's say you have managed fields on a standard object A and a managed object B. Your managed fields on A do not count towards that object's total field limit. Similarly, your managed custom fields on B do not count towards B's limit. However, if an administrator creates fields on B after installation, those fields do count towards B's field limit. For example, if B has 100 custom fields, and your organization limit is 500 fields per object, then B can still have 500 custom fields defined on it after it's been installed. If a package upgrade includes more fields later, they will also not count towards the limit during the upgrade process, so installation can't fail even if the maximum limit has already been reached.

Hope this helps.

Kindly mark this as solved if the reply was helpful.

Thanks,
Nagendra
Brian11Brian11
Hey @Nagendra,

Thanks so much for your reply. After doing lots of research I ran into someone telling me the opposite of what you wrote. See below. I'm not sure if the rules have changed.

In an org you can have 100 (professional), 500 (enterprise) or 800 (unlimited edition) fields per object. This limit is an org wide limit and includes standard fields, custom fields created by an admin and fields coming from a managed package.

If you have a lot of custom fields on a standard object in your package that is a less than optimal design. To work around this you could - for instance - create a custom object that has a master detail relationship to the standard object and a lightning component that shows the details of the child record on the master - standard - record.
Jess Battle 7Jess Battle 7
This is a tricky one, here is how I understand it. Package fields do not count, with the exception of a package upgrade. Example - you are at your limit of custom fields, not including your package fields. In the package upgrade a new package field is introduced, you will get a limit error. Once it is installed however, the field limit goes back to normal. This could just be a bug, it could be my misunderstanding or it could be one of the many things about the platform that ALWAYS follow a set of rules, well except for this one situation (most likely).Â