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
bob17bob17 

Too many namespaces accessed: 11?

Anyone know anything about a namespace limit of 10?  Can't find anything in the documentation and SFDC support promised to get back to me and never did. 

Greg FeeGreg Fee

Hello,

 

There is indeed a default limit of 10 namespaces allowed in a single transaction.  This is noted in the language reference at http://www.salesforce.com/us/developer/docs/apexcode/salesforce_apex_language_reference.pdf, though I'll admit that it took me a while to find this:

 

"In a single transaction, you can only reference 10 unique namespaces. For example, suppose you have an object that executes
a class in a managed package when the object is updated. Then that class updates a second object, which in turn executes
a different class in a different package. Even though the second package wasn't accessed directly by the first, because it
occurs in the same transaction, it's included in the number of namespaces being accessed in a single transaction."

 

 

 

I hope that helps,

 

Greg Fee

salesforce.com

 

 

 

Leah_SeatleLeah_Seatle

This is documented, actually:

 

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_manpkgs_package_versions.htm

 

In a single transaction, you can only reference 10 unique namespaces. For example, suppose you have an object that executes a class in a managed package when the object is updated. Then that class updates a second object, which in turn executes a different class in a different package. Even though the second package wasn't accessed directly by the first, because it occurs in the same transaction, it's included in the number of namespaces being accessed in a single transaction.

bob17bob17

Greg,

 

Thanks for looking, never expected to find this information in a section on Package Versions.   First, it would be a lot more helpful if it were included in the list with all of the other Limits (see http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content/apex_gov_limits.htm)

 

Doesn't seem right that applications from other vendors can suddenly make our application fail for reasons we cannot explain to a customer.  If we stay within all of the many SFDC prescribed govener limits you would think that would be enough but now we have customers that must decide which app is more valuable!  Sorry for the venting.

 

Bob

Greg FeeGreg Fee

Hi Bob,

 

We are currently looking into improving the documentation in this area.

 

The limit exists to stop people from gaming the system by using more and more namespaces in order to circumvent other limits.  In legitimate cases where more than 10 namespaces are required, your salesforce support person may be able to increase this limit.  Be aware that we handle that on a case-by-case basis and there is no guarantee that we'll increase the limit.

 

Greg Fee

bob17bob17

Greg,

 

Thanks for the follow-up.  You have been very helpful!

 

Bob

LloydSLloydS

I believe that I'm the customer that bob17 was referring to. And unfortunately SFDC support said there was no way they could increase the number of namespaces. So we wound up having to uninstall an application. And of course, now I'm trying to install another app and running into the same issue. This is just quite silly. All I want to do is be able to provide necessary functionality to my system. 

 

Where can I find what namespaces are being used in an updated process?

Kirill YunussovKirill Yunussov
you could look in the debug logs, it shows all of the namespaces accessed, and limits used up in each: Setup > Logs > Debug Logs.  Or open the Developer Console and have it open while you execute your update operation.  There is a "Logs" tab in there which will have your logs in it.