You need to sign in to do that
Don't have an account?
PERFECTIONIST
Automatically Downloading attachments from opportunity
Hello All,
Good Time,
I would like to download attachments of Opportunity automatically, could you please suggest how do you want me to procced.
is there any tool which is avaliable in Appexchange.com or do i need to write SOQL if yes then could you please provide me some solution for this.
Thanks in advance
Perfectionist
HI Satish,
This mostly depends on what tools/utilities you use to extract. The SOQL for
Attachment
sObject will always return one row at a time ifBody
field is included in the query. This is enforced to conserver resources and prevent overbearing SOQL scripts.Approach #1, if queryMore is not available: Issue a
SOQL
withoutBody
field to enumerate all attachments, then issue one SOQL per attachment ID to retrieveBody
Approach #2: Issue a SOQL to retrieve all needed attachments then loop using
queryMore
to get them one at a time.Approach #3: If you can "freeze" the SF environment and just want to take snapshot of the system to pre-load a different one to be used going forward you can use "data exports". In setup menu, in data management there is an export data command, make sure you click "Include in export" to include all binary data. After due process it will give you a complete data backup you can crunch offline.
Btw, body is base64 encoded, you'll need to decode it to get the actual binary
http://stackoverflow.com/questions/5865736/how-can-i-extract-attachments-from-salesforce
You may try this tool
https://appexchange.salesforce.com/listingDetail?listingId=a0N30000003Iz0jEAC
Look for code in the links below,
http://nanostuffs.com/Blog/?p=1451
http://www.x2od.com/2010/02/08/docs-and-attachs-out-of-salesforce
Regards,
Ashish
Hello Ashi,
Thanks for your reply.
i tried to download attachements while using Fileexporter tool, and exported attachments folder has been creatd along with Base64. file type. could you please let me know how do we download original file attachments.
and also am finding below error while running the vbs files
-----------------------------------------
Step3cv-ReadVersion
Data.vbs
Line: 26
Char: 2
Error: File no found
code: 800A0035
Source: Microsoft VBScript runtime error
-------------------------------------------------
Step3d-ReadBody.vbs
Line: 26
Char: 2
Error: File not found
Code: 800A0035
Source: Microsoft VBScript runtime error
--------------------------------------------------------
please let us know if you need more details.
Thanks,
Sathish R
Here is the way to view all your attachment through soql...
When u click view in visualforce page you can download your attachment...
http://salesforcekings.blogspot.in/2013/11/view-all-your-attachment-in-visualforce.html
If you found this answer helpful to you... Please accept this as a Solution and give kudos by clicking on the star icon.
Thanks and Regards,
Arunkumar.R | Salesforce Certified Developer
Hi Satish,
Related thread,
https://success.salesforce.com/answers?id=90630000000gzzqAAA
There is a suggestion to use this tool,
https://sites.google.com/site/ezrakenigsberg/blog/fileexporterexportattachmentscontentordocuments
Regards,
Ashish
Hi Satish,
Please see the links for the VB Error,
http://support.microsoft.com/kb/276011
http://www.computerperformance.co.uk/Logon/code/code_800A0035.htm
Regards,
Ashish
Thanks ashish,
i will make the neccessary changes
Hi Satish,
The blog is Written by Arun Kumar who has posted this code for us.
Regards,
Ashish
Thanks for replying for my query.
i have gone through the below blog and could able to see all the attachemnts in single page as of now its great but is there any possibility to download in particular page...could you please help me out
http://salesforcekings.blogspot.in/2013/11/view-all-your-attachment-in-visualforce.html
appreciate your help.
Thanks & Regards,
Sathish R
Can u try this...
http://boards.developerforce.com/t5/Apex-Code-Development/Handling-a-download-in-Visualforce/td-p/340877
I came across the newly developed app in AppExchange where you can download almost any Attachment or File under one or multiple records all at once.
They do support download of Static Resource & Documents, email messages too.
Please have a look: https://sforce.co/34thF8U