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
Steve BrookesSteve Brookes 

Help with Process

Hi All, having a problem with a process built with the fabulous process builder!

We use iContact for sending Mass Mailings to customers, iContact has an object called 'iContactforSF__iContact_Message_Statistic__c' which is generated after a mass mail is sent and when the statistics are written into salesforce, each of this records is attached to a lead and a camaign via a lookup relationship.

The process I have built is that everytime a message statistic record is created, the id of the campaign its part of is written to a field on the lead called 'Primary_Campaign__c', again a lookup relationship. The idea being that there is a record on the main lead object of the most recent campaign that has sent a message - I suspect this may be a long way round of doing this, however, it was fairly easy using the process builder.....that said, I noticed, this doesnt always work....and ontop of this I get a million of these emails from salesforce:


Errorcaused by element : FlowRecordUpdate.myRule_1_A1
caused by: Too many SOQL queries: 101


An error occurred at element myRule_1_A1.
Too many SOQL queries: 101.

This report lists the elements that the flow interview executed. The report is a beta feature.
We welcome your feedback on IdeaExchange
Flow DetailsFlow Name: Set_Primary_Campaign_on_Lead_with_Campaign_of_recent_message
Type: Workflow
Version: 2
Status: ACTIVE
 
Flow DetailsStart time(GMT): Thu Jun 18 11:54:45 GMT 2015
End time(GMT): Not Yet Finished
Duration: 0 seconds
 
Decision: myDecision 
Record Update: myRule_1_A1


Has anyone come accross this before? Any pointers as to what is happening/how to find out/how to resolve, would be much apprecaited.

Many thanks in advance.

Steve
Best Answer chosen by Steve Brookes
Jason Curtis NBSFDGJason Curtis NBSFDG
Unfortunately the process builder in many ways is not "bulkified", it can bump up against the platform govenor limits, see reference here:
https://help.salesforce.com/apex/HTViewHelpDoc?id=process_limits.htm&language=en_US (https://help.salesforce.com/apex/HTViewHelpDoc?id=process_limits.htm&language=en_US)

I imagine you are updating hundreds or thousands of records at a time, this can cause challenge when trying to do lookups, inserts, etc during the same execution context.

The workflow tool (not process builder) is more bulkified, without digging in to deep, you might be able to use it for your needs. Otherwise you might need to create an Apex trigger that is bulkified.

All Answers

Jason Curtis NBSFDGJason Curtis NBSFDG
Unfortunately the process builder in many ways is not "bulkified", it can bump up against the platform govenor limits, see reference here:
https://help.salesforce.com/apex/HTViewHelpDoc?id=process_limits.htm&language=en_US (https://help.salesforce.com/apex/HTViewHelpDoc?id=process_limits.htm&language=en_US)

I imagine you are updating hundreds or thousands of records at a time, this can cause challenge when trying to do lookups, inserts, etc during the same execution context.

The workflow tool (not process builder) is more bulkified, without digging in to deep, you might be able to use it for your needs. Otherwise you might need to create an Apex trigger that is bulkified.
This was selected as the best answer
Steve BrookesSteve Brookes
Thanks Jason - I feared that was going to be the answer.