[SalesForce] Limits on required Lookup Filters when deployed in a managed package

I have a managed package with a number of Lookup fields from Opportunity to Contact and Opportunity to a custom object.

For each of these lookups I'd like to restrict the records the user can select when populating the Opportunity. For example, I'll restrict the Record Type of the Contact on a particular relationship using the Filter Criteria.

After adding 5 required lookup filters I received the following message with each subsequent filter:

You have reached the maximum number of 5 required filters on Opportunity. Any new filters must be optional.

Is this limit specific to the managed package I'm working on or is it cumulative in the organization the package is installed in?

I'm concerned that if the managed package has 5 required lookup filters it won't install in an organization with one or more required lookup filters already in place. If this is the case, would I be better to make the filter optional and back it up with a validation rule to make it required?

Best Answer

I wish I could give you a definite answer, but I checked around and can't find confirmation of what happens to lookup filters in managed packages after passing the security review. But here's what I do know: Once your managed package passes the security review and you have it listed as public, you will be granted your own resource space, with the only exception (that I know of) being tabs. This changes if you have an Aloha App and then even tabs are not counted against the org you install in.

For example, in a privately listed, managed package that hasn't passed the security review yet, any triggers contained within will share the available resources with other triggers in the org (200 SOQL calls, 100 DML statements, 200K script statements, etc.) Once this managed package passes the review, the package gets its own set of 100 DML statements, 200 SOQL statements, 200K script statements, etc.

Although it's difficult to find specific documentation regarding these limit changes after completing the security review, I've been through the review process numerous times and experienced these changes firsthand - along with having confirmation of these changes from premier support. Although again, I haven't specifically checked for lookup filters in this regard.

So I would lean towards you getting your own set of lookup filter limits within your managed package - once certified. But I'm not 100% certain.

Related Topic