0

I'm using lightning:fileUpload in my lightning component to upload files. Now I need to upload the same file to both parent and child case at the same time. Is there any possibility to do that?

<lightning:fileUpload name="fileUploader" multiple="true" recordId="{!v.caseId}" onuploadfinished="{!c.handleUploadFinished}" />

Can we specify more than one recordId in lightning:fileUpload tag

1 Answer 1

1

The lightning:fileUpload component takes only one ID but in the handler for onUploadFinished event, you get the Document ID back. You can make another server call to create a new ContentDocumentLink object record.

Please note these will be two different transactions so based on the requirement you may need to write your own rollback logic.

1
  • Yes !!! Tried the same !! Worked !!! Thanks alot manjit
    – sfdcOwl
    Apr 6, 2020 at 12:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .