8

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?

  • Thought I'd try adding validation rules as well but then ran into the "You have reached the maximum number of 10 object references on Opportunity" limit. – Daniel Ballinger Aug 6 '12 at 23:09
4

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.

  • Other exceptions: custom settings storage limit. Total number of custom fields on an sObject. Total number of indexed fields on an sObject. Total number of lookup fields on an sObject. Total number of rollup fields on an sObject. These are all per-object/org and not per-namespace. Although some of them are soft limits salesforce can increase. You'll notice most of the schema-related limits are per-object/org and not per namespace so I'm worried lookup filters are the same. – ca_peterson Aug 3 '12 at 17:07
  • I asked on Twitter and the response I got was that Aloha apps get their own set of limits that don't impact the installing org's limits. twitter.com/zachelrath/status/231433160464945152 Note that Aloha apps are a subset of managed packages. You can have a managed package that isn't an Aloha app (for example a private managed package). – Daniel Hoechst Aug 3 '12 at 17:16
  • Good points. If anyone happens across a definitive post-certification limits breakdown, please share the link. – Adam Aug 3 '12 at 17:46
1

This is a limit on Salesforce and you can see your usage from the interface. For Opportunities, use the following click-path: My Name -> Setup -> App Setup -> Customize -> Opportunites -> Limits. You will see an entry for "Active Lookup Filters" with a limit of 5.

Salesforce also publishes the limits by edition.

Edit: I missed the fact the question was relating to managed packages.

0

You may also be able to file a case and have that limit increased. We had to do this for Max Rollup Summary fields (from 10 to 25). Of course this also means that all our trial orgs and customer orgs need this change as well or the package install fails.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.