We're trying to track on leads/contacts when the first activity was sent.

We built a pretty basic process that looks at activities created, if the WhoId starts with 00Q we know it's a lead and populate a custom field Lead__c on the Activity.

From there, we use another process so that when Lead__c is populated and Lead__r.First_Touched_Date__c is null we set the value to NOW(). All pretty straightforward.

Generally, this works well. However, when Hubspot pushes a lot of activities into SFDC at once we're emails stating Error Occurred: Too many SOQL queries: 101

My assumption is that there's some sort of a loop that's inserting the records and doing a SOQL query to identify the WhoId.

Has anyone faced this? Any other workaround than to go the code route?

Flow Details
Flow Name: Activity_Created
Type: Workflow
Version: 2
Status: Active

Flow Interview Details
Interview Label: Activity_Created-2_Task
Current User: Integration User (00528000003HQvj1)
Start time: 16/03/2017 10:42 AM
Duration: 0 seconds

How the Interview Started
Simon Turner (00528000003wq2i) started the flow interview.
Some of this flow's variables were set when the interview started.
myVariable_old = null
myVariable_current = 00T28000019aJMVEA2
ASSIGNMENT: myVariable_waitStartTimeAssignment
{!myVariable_waitStartTimeVariable} Equals {!Flow.CurrentDateTime}

{!myVariable_waitStartTimeVariable} = "16/03/2017 10:42 AM"

DECISION: myDecision
Executed this outcome: myRule_1
Outcome conditions: and
1. {!myVariable_current.WhoId} (00Q2800000SyRAlEAN) Starts with 00Q
2. {!myVariable_current.Status} (Completed) Equals Completed
Logic: All conditions must be true (AND)

Find all Task records where:
Id Equals {!myVariable_current.Id} (00T28000019aJMVEA2)
Update the records’ field values.
Lead__c = {!myVariable_current.WhoId} (00Q2800000SyRAlEAN)

Failed to update records that meet the filter criteria.
Error Occurred: Too many SOQL queries: 101
  • 2
    If you want to support high volume, yes you'll likely have to convert to Apex. – Adrian Larson Mar 16 '17 at 17:29

Your Answer

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

Browse other questions tagged or ask your own question.