Connect files to multiple records using flow #inSalesforce
Create a screen flow
Create Account, One, Use Separate.. Account, Name equals SampleAccount
Create Opportunity, One, Use Separate.. Opportunity, Name equals SampleOpportunity, Stage equals Prospecting and CloseDate equals CurrentDate
Screen Element:
upload File Component
Add details
Loop Element:
uploadFileScreenElement.contentDocIds
Create variable:
newcontentdocumentLink, record type, Content Document Link Object
Create variable:
newcontentdocumentLinkCollection, record type, Content Document Link Object. Allow multiple..
Assignment Element:
create file for Account:
newcontentdocumentLink.contentDocumentId equals loopThrough
newcontentdocumentLink.linkedEntityId equals AccountId from createAccount Element
newcontentdocumentLinkCollection Add newcontentdocumentLink
Assignment Element:
create file for Opportunity:
newcontentdocumentLink.contentDocumentId equals loopThrough
newcontentdocumentLink.linkedEntityId equals Opportunity from createOpportunity Element
newcontentdocumentLinkCollection Add newcontentdocumentLink
Create Finally
Create Element: multiple newcontentdocumentLinkCollection
Visual: https://www.youtube.com/watch?v=Vf6eejiumq8
Comments
Post a Comment