0

I am trying to find workaround for mass uploading files and attach it to records based on some unique number.

Example:Account with pan number-12345 ..when I upload files to salesforce file it should find this pan number and attach it to account.

Attached file naming convention will be with Pan-number.Based on that I can link with account pan.

what is the approach to achieve this kind of requirement??

I am trying to use salesforce files I can do mass uploading but how can i link it to records automatically as I may have (6000 files).

2 Answers 2

0

You can create a custom field on "Files" which would be lookup to account.Then you can write a trigger on contentversion and perfom the attachment operation, by first searching the account records and then attaching them to the files/content version records.

1
  • Can you just share sample code for this . Commented Dec 12, 2015 at 23:11
0

If this is a one-time operation (and you want to avoid any code), you can use Data Loader, presuming there is a lookup relationship from ContentVersion to Account.

You would place all the files in a common directory and via Excel, prepare the CSV file to associate the filename to the accountId. Instructions for this are here. AccountId would be a separate column in the CSV.

You must log in to answer this question.

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