LightningFlowComponents icon indicating copy to clipboard operation
LightningFlowComponents copied to clipboard

fileUploadImproved - Error When Uploading a file

Open merseytechnology opened this issue 9 months ago • 0 comments

Steps to reproduce

Steps to reproduce the behavior:

  1. Run Flow (in this instance it is in a utility item)
  2. Click on Upload files, add a file and click done.
  3. Error toast appears 'We hit a snag. Document with ID: 069Sr00000KNgXx is already linked with the entity with ID: 0058d000007R6R1'
  4. 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

Image Image

Debug Logs

apex-07LSr0000068B1FMAU.log

merseytechnology avatar Apr 29 '25 08:04 merseytechnology