Skip to main content
Hi all,

 

For some reason I have a flow that works just fine non-scheduled, but when I schedule it, it can't find the records. I've even queried in the developer console and can verify that the record does indeed exist:

 

Do scheduled flows work differently than regular flows?

 

Then in the error email for some reason it's doing a lookup twice, the first time it succeeds the second it fails:

 

User-added image

 

When I run the debug on the flow I don't get any errors either:

How the Interview Started

 

Ariel Ward (0053k000008ew7V) started the flow interview.

 

FAST LOOKUP: GetServiceAppointments

 

Find all ServiceAppointment records where:

 

Status Equals Approved

 

Days_Until_Service_Appointment__c Greater than or equal 1

 

Delivery_Method__c Contains Fax

 

Latest_Published_Version_ID__c Is null true

 

A5_NDOS_Sent__c Equals false

 

Is_within_lead_time__c Equals true

 

Sort records by: Days_Until_Service_Appointment__c (Ascending)

 

Store the values of these fields in GetServiceAppointments: Id, Latest_Published_Version_ID__c

 

Result

 

Successfully found records.

 

LOOP: AssignDocumentLoop

 

Loop Through: [08p3k000000YijiAAC]

 

Iteration: 0

 

Current value of {!AssignDocumentLoopVar}: 08p3k000000YijiAAC

 

FAST LOOKUP: GetContentDocumentLink

 

Find all ContentDocumentLink records where:

 

LinkedEntityId Equals {!AssignDocumentLoopVar.Id} (08p3k000000YijiAAC)

 

Sort records by: SystemModstamp (Descending)

 

Store the values of these fields in GetContentDocumentLink: Id, ContentDocumentId

 

Result

 

Successfully found records.

 

FAST LOOKUP: GetVersionID

 

Find all ContentDocument records where:

 

Id Equals {!GetContentDocumentLink.ContentDocumentId} (0693I0000001yJkQAI)

 

Sort records by: SystemModstamp (Descending)

 

Store the values of these fields in GetVersionID: LatestPublishedVersionId, Id

 

Result

 

Successfully found records.

 

ASSIGNMENT: AssignVersionID

 

{!AssignDocumentLoopVar.Latest_Published_Version_ID__c} Equals {!GetVersionID.LatestPublishedVersionId}

 

Result

 

{!AssignDocumentLoopVar.Latest_Published_Version_ID__c} = "0683I0000001yHPQAY"

 

ASSIGNMENT: AssignToUpdateColl

 

{!UpdateColl} Add {!AssignDocumentLoopVar}

 

{!SOQLCounter} Add 2

 

Result

 

{!UpdateColl} = "[ServiceAppointment (08p3k000000YijiAAC)]"

 

{!SOQLCounter} = "4"

 

DECISION: SOQL_Limit

 

Skipped this outcome because its conditions weren't met: SOQL_Warning

 

Outcome conditions:

 

{!SOQLCounter} (4) Greater than or equal 97

 

Default outcome executed.

 

LOOP: AssignDocumentLoop

 

End Loop.

 

FAST UPDATE: UpdateServiceAppointments

 

Update ServiceAppointment records whose IDs are stored in {!UpdateColl}.

 

Variable Values

 

[Id=08p3k000000YijiAAC,Latest_Published_Version_ID__c=0683I0000001yHPQAY]

 

Result

 

All records whose IDs are in {!UpdateColl} are ready to be updated when the next screen, pause, or local action is executed or when the interview finishes.
2 Antworten
0/9000