Jose Castano
Jose Castano

Reputation: 1

Download Multiple Attachments from Salesforce using Jitterbit

I am able to create a query for attachments and download 1 individual file like this:

SELECT Body, Id FROM Attachment WHERE Id = '00P4M00000q8ChI'

<trans>$content = root$transaction.response$body$queryResponse$result$records.Attachment$Body$; $decoded_content=Base64Decode($content); WriteFile("<TAG>Targets/Files/FMLA _Extract</TAG>",$decoded_content); </trans>

But when the multiple attachments are pulled, it creates 1 large file. This large file sometimes shows the first page, but most of the time Adobe is not able to read it. Instead, I would like to have multiple files listed on my target directory.

Thank you in advance for your help!

Target file:

FMLA_Extract

Upvotes: 0

Views: 368

Answers (1)

robaker
robaker

Reputation: 1029

What does your file target look like? (Targets/File/FMLA_Extract). I'm guessing it's configured to append to existing files and you're not changing the file name, so they all get glommed on top of each other.

Upvotes: 0

Related Questions