• Judith Randall 12
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Hi. I have a flow that creates a campaignmember record.  Before creating the new record it checks to make sure a record doesn't already exist.  Get records "failed to find record" so the create record runs only to fail with "Duplicate value".  The only thing I can see is that Salesforce is not using the 18 character ID but I'm a bit stumped at this.  If the record has been recently deleted could that have an impact?  To fix this I manually created the campaign member and I got no duplicate error message on manual insertion.  Any ideas please?
User-added image
Hi.
I have a scheduled flow that loops through specific tasks created in the last 24 hours and checks if the contact exists, and if the campaign member exists and if it doesn't, it adds a new campaign member. When I run it in debug mode it works fine.  However, when it runs on schedule it is failing as it is trying to create the campaign members multiple times (around 11,000 times !).  When I look through the log (which is too long to post), it is only running through each task once and working perfectly. In this example just 21 tasks to loop through. So when running in debug mode, it is identical except it only tries to create one of each record and doesn't fail.

Has anyone come across something like this before? Are there any specific differences between running in debug mode and running in schedule mode?

This is the flow, it is fairly basic:
User-added image
Not sure what else I can provide to help, This is an excerpt from the log on a record that is trying to create multiple times:

Loop Through: [00T0600004WVxFyEAL,00T0600004WVxR1EAL,00T0600004WVxUPEA1,00T0600004WVxUWEA1,00T0600004WVxuwEAD,00T0600004WVy5aEAD,00T0600004WVyO8EAL,00T0600004WVzOzEAL,00T0600004WVzwFEAT,00T0600004WW0G8EAL,00T0600004WW0QgEAL,00T0600004WW0pgEAD,00T0600004WW0wtEAD,00T0600004WW1MpEAL,00T0600004WW38bEAD,00T0600004WW3OOEA1,00T0600004WW3hqEAD,00T0600004WW5UYEA1,00T0600004WW5XtEAL,00T0600004WW5hDEAT,00T0600004WW7ODEA1,00T0600004WW9mOEAT]
Iteration: 2
Current iteration item: 00T0600004WVxUPEA1
GET RECORDS: Get_Contact
Find one Contact record where:
Phone_No_Spaces__c Contains {!LoopThrough.NVMContactWorld__Customer_Number__c} (+44numberremoved)
Result
Successfully found record.
{!ContactID} = 0031o00001vT9pZAAS
DECISION: Contactisnotnull
Outcome executed: ContIsNotNull
Outcome conditions:
{!ContactID} (0031o00001vT9pZAAS) Is null false
GET RECORDS: CampMemberExists
Find one CampaignMember record where:
CampaignId Equals {!LoopThrough.CampaignID__c} (7011o0000016RfmAAE)
AND ContactId Equals {!ContactID} (0031o00001vT9pZAAS)
Result
Failed to find record.
DECISION: DoesMemberAlreadyExist
Outcome executed: CampMembdoesnotExist
Outcome conditions:
{!CampaignMemberID} (null) Is null true
ASSIGNMENT: AssignIndividual
{!CampaignMemberSingle.CampaignId} Equals {!LoopThrough.CampaignID__c}
{!CampaignMemberSingle.ContactId} Equals {!ContactID}
{!CampaignMemberSingle.How_Member_Added__c} Equals {!AddedBy}
Result
{!CampaignMemberSingle.CampaignId} = "7011o0000016RfmAAE"

Many thanks in advance for any help.
Hi.
I have a scheduled flow that loops through specific tasks created in the last 24 hours and checks if the contact exists, and if the campaign member exists and if it doesn't, it adds a new campaign member. When I run it in debug mode it works fine.  However, when it runs on schedule it is failing as it is trying to create the campaign members multiple times (around 11,000 times !).  When I look through the log (which is too long to post), it is only running through each task once and working perfectly. In this example just 21 tasks to loop through. So when running in debug mode, it is identical except it only tries to create one of each record and doesn't fail.

Has anyone come across something like this before? Are there any specific differences between running in debug mode and running in schedule mode?

This is the flow, it is fairly basic:
User-added image
Not sure what else I can provide to help, This is an excerpt from the log on a record that is trying to create multiple times:

Loop Through: [00T0600004WVxFyEAL,00T0600004WVxR1EAL,00T0600004WVxUPEA1,00T0600004WVxUWEA1,00T0600004WVxuwEAD,00T0600004WVy5aEAD,00T0600004WVyO8EAL,00T0600004WVzOzEAL,00T0600004WVzwFEAT,00T0600004WW0G8EAL,00T0600004WW0QgEAL,00T0600004WW0pgEAD,00T0600004WW0wtEAD,00T0600004WW1MpEAL,00T0600004WW38bEAD,00T0600004WW3OOEA1,00T0600004WW3hqEAD,00T0600004WW5UYEA1,00T0600004WW5XtEAL,00T0600004WW5hDEAT,00T0600004WW7ODEA1,00T0600004WW9mOEAT]
Iteration: 2
Current iteration item: 00T0600004WVxUPEA1
GET RECORDS: Get_Contact
Find one Contact record where:
Phone_No_Spaces__c Contains {!LoopThrough.NVMContactWorld__Customer_Number__c} (+44numberremoved)
Result
Successfully found record.
{!ContactID} = 0031o00001vT9pZAAS
DECISION: Contactisnotnull
Outcome executed: ContIsNotNull
Outcome conditions:
{!ContactID} (0031o00001vT9pZAAS) Is null false
GET RECORDS: CampMemberExists
Find one CampaignMember record where:
CampaignId Equals {!LoopThrough.CampaignID__c} (7011o0000016RfmAAE)
AND ContactId Equals {!ContactID} (0031o00001vT9pZAAS)
Result
Failed to find record.
DECISION: DoesMemberAlreadyExist
Outcome executed: CampMembdoesnotExist
Outcome conditions:
{!CampaignMemberID} (null) Is null true
ASSIGNMENT: AssignIndividual
{!CampaignMemberSingle.CampaignId} Equals {!LoopThrough.CampaignID__c}
{!CampaignMemberSingle.ContactId} Equals {!ContactID}
{!CampaignMemberSingle.How_Member_Added__c} Equals {!AddedBy}
Result
{!CampaignMemberSingle.CampaignId} = "7011o0000016RfmAAE"

Many thanks in advance for any help.
Hi. I've been looking for official documentaion on the number of decision elements you can have in one decision box in a flow?  We had 34 but only 21 actually evaulated when running the flow.  Raised the question with Salesforce support but they said they don't know and to post it on here.  We have worked around it by splitting into 2 and using criteria on the process flow to decide which one to run, but for future reference it would be good to get an official answer on this. Thank you.