LightningFlowComponents
LightningFlowComponents copied to clipboard
fileUploadImproved - Error When Uploading a file
Steps to reproduce
Steps to reproduce the behavior:
- Run Flow (in this instance it is in a utility item)
- Click on Upload files, add a file and click done.
- Error toast appears 'We hit a snag. Document with ID: 069Sr00000KNgXx is already linked with the entity with ID: 0058d000007R6R1'
- Looking in debug log I see FATAL_ERROR Class.FileUploadImprovedHelper.createContentDocLink: line 85, column 1 FATAL_ERROR System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, Document with ID: 069Sr00000KNgXx is already linked with the entity with ID: 0058d000007R6R1: [LinkedEntityId]
Expected behaviour
File is uploaded and no error
Actual behaviour
File does get uploaded but error appears
Screenshots
Debug Logs