You need to sign in to do that
Don't have an account?
Prashant Gandhi
Alternative for {!URLFOR($Action.Attachment.Download, attachmentId)}
Hi,
I am tryng to preview and download a PDF through a vf page.
Here is the code snippet:
<div class="downloadpart">
<apex:outputPanel rendered="{!(attachmentId!=null)}">
<a href="{!URLFOR($Action.Attachment.Download, attachmentId)}','_blank'" class="btnbtn pull-left" >Preview</a>
</apex:outputPanel>
<a href="#" class="btnbtn centerbtn" style="text-align: center; margin-top:0px">Download User Manual</a>
<a href="#" class="btnbtn pull-right" style="text-align: center;">Download Deposit Receipt</a>
</div>
it gives me an error stating insufficient privileges.
would appreciate if i can get help.
I am tryng to preview and download a PDF through a vf page.
Here is the code snippet:
<div class="downloadpart">
<apex:outputPanel rendered="{!(attachmentId!=null)}">
<a href="{!URLFOR($Action.Attachment.Download, attachmentId)}','_blank'" class="btnbtn pull-left" >Preview</a>
</apex:outputPanel>
<a href="#" class="btnbtn centerbtn" style="text-align: center; margin-top:0px">Download User Manual</a>
<a href="#" class="btnbtn pull-right" style="text-align: center;">Download Deposit Receipt</a>
</div>
it gives me an error stating insufficient privileges.
would appreciate if i can get help.
This is a permission issue as Sys Admin is able to download it. Would recommend you to check the user profile and its role.
Thanks