You need to sign in to do that
Don't have an account?
Sforce.Ninja
Downloading Attachment Link on Salesforce1
Hi,
I am using AngularJS to build a page on Salesforce1 mobile app. I have ability for users to upload attachments which are then saved in Attachment object. On Inserting the attachment, I am populating the id of the attachment on the object. Lets call it AttachmentId__c.
Normally ill simply use the '/servlet/servlet.FileDownload?file=' link to generate attachment link.
However, on Salesforce1 this link goes nowhere, it takes the user on the chatter feed and displays error. please login to correct org.
Is there a way to get ServerURL for Salesforce1? Any pointers appreciated.
I am using AngularJS to build a page on Salesforce1 mobile app. I have ability for users to upload attachments which are then saved in Attachment object. On Inserting the attachment, I am populating the id of the attachment on the object. Lets call it AttachmentId__c.
Normally ill simply use the '/servlet/servlet.FileDownload?file=' link to generate attachment link.
However, on Salesforce1 this link goes nowhere, it takes the user on the chatter feed and displays error. please login to correct org.
Is there a way to get ServerURL for Salesforce1? Any pointers appreciated.
joshbirk
You mean a link to download the attachment? So the insert is fine, you have an ID but you are trying to trigger off a download? A VF page with the right mime/content type might be the way to go.
Sforce.Ninja
Can you elaborate a bit?
joshbirk
You can set the body of the page to do nothing but output the attachment body and then set the contentType, you should have a VF page which does nothing but serve that file.