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
Serena SchultzSerena Schultz 

Screen flow error in Sandbox: setCommitAllowed(false)

Hello Smart Salesforce People!

I'm hoping you can shed some light on a screen flow error I'm getting. 

Situation: I have a screen flow in a Community that allows community users to upload files to their Account record. When that file is uploaded the ContentDocID is saved in a field on the Account and any change to this field fires an autolaunched flow to go through a series of steps to create a content distribution record for the uploaded file and then post the Content Distribution Download URL to a second field on the Account record (which is then fed to an API to post the image on a public website).

These two flows are working well together in Production, but I have two sandboxes (one on Winter '19 and the other on Spring '19) where I am now getting this error on the autolaunched flow. (See below)

I've googled the error message and I'm coming up blank. Thoughts? What is this and how do I fix it?

Error element GetPublicDownloadLinkURL_1 (FlowRecordLookup).
This error occurred when the flow tried to look up records: java.lang.IllegalStateException: commits are not allowed because someone called setCommitAllowed(false), justification: null. You can look up ExceptionCode values in the SOAP API Developer Guide.

Flow Details
Flow Name: Set_Public_Link_for_Institution_Logo_Upload
Type: Autolaunched Flow
Version: 10
Status: Active

Flow Interview Details
Interview Label: Set Public Link for Institution Logo Upload 2/1/2019 4:19 PM
Current User: School Admin Test (x)
Start time: 2/1/2019 4:19 PM
Duration: 0 seconds

How the Interview Started
School Admin Test (x) started the flow interview.
Some of this flow's variables were set when the interview started.
varInstitutionId = 0011H00001R9RWbQAN
varWRGPImageContentDocID = 069J0000000g4n8IAA

DECISION: Is_Logo_DocID_variable_null
Executed this outcome: Yes
Outcome conditions: 
{!varConfirmedContentDocID} (null) Is null true

DECISION: Is_WUE_Image_DocID_variable_null
Executed this outcome: Yes_0
Outcome conditions: 
{!varWUEImageContentDocID} (null) Is null true

DECISION: Is_WRGP_Image_DocID_variable_null
Skipped this outcome because its conditions weren't met: Yes_0_0
Outcome conditions: 
{!varWRGPImageContentDocID} (069J0000000g4n8IAA) Is null true

Executed the default outcome

RECORD QUERY: Find_Uploaded_Logo_0_0
Find one ContentDocumentLink record where:
LinkedEntityId Equals {!varInstitutionId} (0011H00001R9RWbQAN)
ContentDocumentId Equals {!varWRGPImageContentDocID} (069J0000000g4n8IAA)
Result
Successfully found record.
{!varContentDocID} = 069J0000000g4n8IAA

RECORD QUERY: Content_Document_Version_0_0
Find one ContentVersion record where:
ContentDocumentId Equals {!varContentDocID} (069J0000000g4n8IAA)
IsLatest Equals true
Result
Successfully found record.
{!varContentVersionID} = 068J0000000gAeqIAE

RECORD CREATE: Create_Content_Distribution_0_0
Create one ContentDistribution record where:
ContentVersionId = {!varContentVersionID} (068J0000000gAeqIAE)
Name = {!fUploadedLogo} ( Institution Logo)
PreferencesAllowOriginalDownload = true
PreferencesAllowViewInBrowser = true
PreferencesLinkLatestVersion = true
PreferencesNotifyOnVisit = false
RelatedRecordId = {!varInstitutionId} (0011H00001R9RWbQAN)
Result
A record is ready to be created when the next Screen or Wait element is executed or when the interview finishes.
{!varContentDist} = 05DJ00000008SSJMA2

RECORD QUERY: GetPublicDownloadLinkURL_1
Find one ContentDistribution record where:
Id Equals {!varContentDist} (05DJ00000008SSJMA2)
Result
Failed to find record.