AnsweredAssumed Answered

Upload Documents to Salesforce Object as Attachments.

Question asked by skagrawal933025 on May 1, 2018
Latest reply on May 17, 2018 by leif_jacobsen

I have a list of .pdf files, that are uniquely identified by the custom object name in Salesforce. So say for example that I have 600 records in the custom salesforce object and I have 400 .pdf files within my local server directory. The ask is that I should systemically attach the .pdf file to the custom salesforce object. The reason for doing this in Boomi is because there is another process outside the scope of this question that updated the .pdf files on a daily basis. I need to make sure that the latest file is attached to the corresponding record. For Example, consider the following .pdf files on the local file system :  001.pdf, 002.pdf, 003.pdf, 004.pdf ....... 400.pdf. The names of the records on the custom Salesforce object is : 001, 002, 003 ,004, .....600.

GOAL :  Attach 001.pdf file to the record named 001 in the custom salesforce object.

 

I have a rough idea on the approach as below : 

Step 1: Get ObjectID & name of the records from salesforce.

Step 2: Read all the files from the folder location. (Here I am not able to get the file name)

Step 3: Some how create a Map to map all the files names without extension to the records name from Step 1

Step 4: Update Saleforce Attachment with the object Id and the file content.

 

Step1 was fairly simple, I need help with the rest of the solution. Any Help is appreciated.

 

Thanks,

Outcomes