0

I have faced following issue while running the test class.I am trying to insert 1000 records in test class ,the object have scheduled process builder.i am facing following error recently.

Error: Could not evaluate formula for value passed to Flow 'process builder name'. FlowDefId: 3000y000000boXy FlowVersionId: 3010y000000bqA5: Too many async jobs enqueued for this apex test context

Please any one help me out.

  • 1
    Could you please share some of the code? That would help us understand the root of the issue and help you point it out more efficiently. Thanks. – Alexander Aeons Torn Sep 17 '18 at 8:41
  • Post both class and unit test so that somebody can help you better. – Jarvis Sep 17 '18 at 8:49
1

As the error states, you're trying to queue too many jobs. You will be limited to inserting just 200 records in your unit test (presuming this doesn't exceed the limits), since each chunk of 200 records will result in calling your process builder/flow.

  • Thank you for you information.But we have developed test class 1 back.But we didn't get any issues till last moth.We received from start of this month only.Do we have any root cause for this issue?,If you have any information please share,it will help full to me. thank you once again for your valuable information. – Suresh Sep 17 '18 at 9:17
  • @B.V.Suresh Is this a new process? Did your sandbox recently upgrade to Winter 19? – sfdcfox Sep 17 '18 at 9:18
  • This is not new process,developed in month of March 2018.This error exist in all our sandboxes and production as well.is there any update in Winter 19 related to this issue please let me know if you have any related links or work around ? – Suresh Sep 17 '18 at 9:28
  • @B.V.Suresh again, I'm pretty sure you need to reduce the number of records from 1,000 to 200. – sfdcfox Sep 17 '18 at 9:31
  • Yes i accept with you,i have tested also,it accept up to 197 records not even 200.Thank you.. – Suresh Sep 17 '18 at 9:41

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.