Skip to main content

Hey there, I am doing an implementation for my client who requires service reports to be generated for their Work Order Line Items on a regular basis.

 

I have created a daily scheduled Flow that finds all completed Work Order Line Items for that day and loops through each record to create Service Report records for each of those WOLIs.

 

I am running the flow as a System Administrator user and it works fine when I debug it, but when I activate the schedule triggered flow I get the following error: "INSUFFICIENT_ACCESS_OR_READONLY: null. You can look up ExceptionCode values in the SOAP API Developer Guide.---This error occurred when the flow tried to create records:"

 

I can't access the Sharing Settings for Service Reports or Work Order Line Items but the user running the flow (who is the same as the Default Workflow User in the Process Automation Settings) is System Admin with ability to View and Modify all data in the environment.

 

Any ideas? Thanks in advance! 

5 respostas
  1. 29 de out., 14:40

    Hi Camille, thank you so much for taking the time to share your experience and suggestions. Your description sounds very similar to what we’re seeing: the Service Report is created successfully during manual or debug runs, but fails when the Work Order is updated by the scheduled flow.

    I’ve opened a case with Salesforce Support to get a concrete explanation of why the Service Report creation fails specifically in the scheduled-flow context. They shared the documented Apex approach for creating a Service Report, and I’m following up with them to confirm whether that will work for our setup and what is causing the current failure.

    Your suggestion to move report creation out of the scheduled flow is very helpful. We’re also making sure any solution will prevent a Work Order from being marked Closed if its Service Report isn’t successfully created.

    Thanks again for sharing what worked for your team!

0/9000