2

I've been told by a contractor that the code they've written (which is causing errors) is tied to a known Saleforce limit where a record may have a maximum of 5000 activities associated with it. And that due to our dataload exceeding that limit, the SOQL statement in the class is failing.

I cannot share the actual class (NDA) but I'm more interested if anyone is aware of this supposed limit or how it could effect a SOQL call? I can't find documentation referencing such a limit anywhere on success.salesforce.com and I'm trying to determine just how legitimate the claim is.

  • Followup: If it is a known issue, are you aware of a workaround? – HomerJ May 6 '15 at 17:38
  • 2
    So I think some clarification is needed. I think this contractor is trying to say that a single Apex Transaction can return 50,000 records across all SOQL calls. I have never heard of a 5,000 activities limit, and I just inserted 7K activities onto an account wihtout issue. In general what is termed "Account Skew" can occur which can have impacts on system performance if you have too many parent-child records. – CoryCowgill May 6 '15 at 17:56
  • 2
    Also the proper way to handle large data volumes on the platform is to break logic into Batch Apex which allows millions of records to be processed asynchronously. salesforce.com/us/developer/docs/apexcode/Content/… – CoryCowgill May 6 '15 at 17:57
  • 1
    Here is the limits reference guide: na24.salesforce.com/help/pdfs/en/… and here is the large data volume guide also: salesforce.com/docs/en/cce/ldv_deployments/… hope that helps. – CoryCowgill May 6 '15 at 17:59
  • Thank you @CoryCowgill It's good to know that you are seeing the same information that I am. I'll keep this thread updated if/when there is more details. – HomerJ May 6 '15 at 18:16
0

It is probable. There is a limit for limiting maximum number of child records in a master details relationship to 10000. I also couldn't find activities 5k limit.

If there is no strong requirement that require you use activities, you can create a custom activity object as child object. And create a a mandatory lookup field in custom event object. This will let you overcome the limit.

  • Thank you @Victor The Activities object is a critical tool for the implementation so replacing it is not an option. However, we're working through the code to see if WE can identify the actual issue. – HomerJ May 6 '15 at 18:18
  • 10K is the "Magic" number for records in SFDC. You will see performance degradation when you hit this and it's also known as "Account Skew". Checkout the link for the Large Data Volumes which describes how to handle that scenario. – CoryCowgill May 7 '15 at 13:26

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.