+ Start a Discussion
no_conno_con 

Attachments download via sites

Hello All

 

I have a force.com site in which users (i call them users but they are just contacts in my Org, not real SF users) can login and log cases, attach files etc. (please ignore the similarity to cutomer portal - it is a given state).

 

another functionality is that a user can view logged cases along with their comments and attachments (and is able to download the attachments).

everything was working fine untill i created an assignment rule for the new cases inserted to be directed to a queue.

Now, once the user logs in to the site and tries to download an attachment, he gets an authoriztion required page.

 

Now, i was thinking permissions - but i can still see the case, comments and attachments just fine. the only thing that isnt working is when i try to download an attachment.

 

I am using the

{!URLFOR($Action.Attachment.Download, attachmentId)}

syntax.

 

any insights will be most appreciated.

 

 

sfdcfoxsfdcfox

The URL you're using is for authenticated SF users. It won't work for "guest" users (as it would appear you've made them in this context). Instead, make a new VF page that exports attachments, or you may want to discover the URL for case attachment downloads offered in the self-service portal.

SFDC-cloudSFDC-cloud

Create a pdf link or button in the page and generate the pdf file when you click the link

 

 

JasonGablerJasonGabler

Unless I'm not understanding what  is saying, I believe the access rights he explains are incorrect.  Using the method do display attachments described in this thread I was able to view attached images &  download attached PDFs as long as the Site Guest User has read permission for attachments' parent object.

 

Hope this helps someone.  Check out the link I gave, it has create examples for using attachemnts on Sites.

 

Jason Gabler

 

 

RayGRayG

Jason,

 

Thanks so much for adding this.  Really helped me out.