Questions tagged [document]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
13
votes
3answers
18k views

Best practices for monitoring Scheduled Apex and Batch Apex?

We have multiple Apex jobs running, both from Schedulable and Batchable code. While an attentive SA could examine the Apex Jobs list to check that everything is OK, it seems a better idea to have ...
10
votes
2answers
4k views

When to use Static Resource vs Documents

I want to use a check mark image in the formula field. I got confused about where to store the image: in static resources or in documents. Please explain to me the use cases of both.
10
votes
2answers
8k views

Upload an Attachment via the Rest API

I'm having an issue uploading attachments via the REST API. When trying to upload attachment data (i.e. data about the attachment and the associated base64 binary data) I'm getting a 400 result (Bad ...
8
votes
2answers
6k views

Uploading file via visualforce page error “Maximum view state size limit (135KB) exceeded”

I am trying to implement a page that I will upload files through it, but I keep having this error Maximum view state size limit (135KB) exceeded. Actual view state size for this page was 158....
7
votes
2answers
7k views

How to preview documents in SalesForce?

In my Apex page we want to show the preview for the SalesForce documents? We want to have preview for the following file types? Supported file types: MSWord, MSExcel, PDF and PPT. Is the any we ...
6
votes
2answers
2k views

How to share documents with customer community login users

So we need to share a number of documents with our customers who our accessing our community using the Customer Community Login license. The documents that need to be shared are VF pages rendered as ...
5
votes
1answer
1k views

Salesforce Document Unique Name Issue

We are facing an issue with "Salesforce Document" while uploading a document in "My Personal Document". After uploading a "Test Document" if we delete it, we are not able to upload a "Test Document" ...
5
votes
1answer
1k views

How include Salesforce file picker for a custom VF Page

I have a VF page where I need to attach files for an Email to be sent. I am using apex:inputFile for uploading the attachments. When you click on the "Browse" button next to the attachment, it opens ...
4
votes
1answer
630 views

REST API Sobject GetUpdated/GetDeleted on sobjects returns The requested resource does not exist

I am trying to use the following - http://www.salesforce.com/us/developer/docs/api_rest/Content/resources_getupdated.htm On 'Document'. Authentication and everything is successful, even calls to '...
4
votes
1answer
134 views

Change in ImageServer Behavior?

We have an app that manages images in Salesforce. Part of the functionality is generating Document records that are externally available, then saving the externally available link in a field on a ...
4
votes
1answer
37 views

Sharing 'Document' sobject among different user?

Say, there are two users - A and B. One document - X X is owned by A but shared with B. The REST Access is granted with user B. If X was modified by A, would invoking 'updated' API from B's ...
4
votes
1answer
4k views

How can I unit test Uploading a Document using Visualforce and a Custom Controller?

I'm presently playing with the cookbook recipe at http://developer.force.com/cookbook/recipe/uploading-a-document-using-visualforce-and-a-custom-controller ... and trying to figure out how to unit ...
3
votes
1answer
255 views

What contributes to Salesforce File Storage?

I was asked by one of my colleagues to delete the the files of one inactive user since he's currently the top user by file storage. I know I can delete some of his files in the documents tab but is ...
3
votes
1answer
241 views

How do I generate 2 different documents from the same VisualForce page?

I've figured out how to open a VisualForce page that autogenerates a Word document using a button click: <apex:commandButton onClick="window.open('/apex/GrantDoc?id={!Grant__c.Id}');" id="...
3
votes
1answer
2k views

Blob store the data in binary form or in base64

1) When we upload a file into the document object then is the body of the document in binary form or in base64 form? 2) If I uploaded two files in document, First is abc.txt and second is xyz.pdf ...
3
votes
1answer
487 views

Community user can not return document

I am creating my own profile page (branding/security reasons) and I ran into an issue where the user is not able to change their profile image. public Document document { get { if (...
3
votes
1answer
41 views

Using Apex or API, how to determine who has access to a Document Folder?

In Salesforce UI, I can assign access to Document Folders. How can I determine who has access to a Document Folder with Apex or API? I thought I would find an object like "FolderMember" or similar, ...
3
votes
0answers
874 views

Email images not displaying ONLY in Outlook Desktop

EDIT: I posted a similar question (attacking this problem from the Outlook end) over at Super User: link I have an email template that uses a letterhead with an image (document) at the top. I have ...
2
votes
2answers
1k views

Replacing HTML Document error

We have a html document which we're using in SF Community and I'm trying to replace it. But I get the following error: Error: The branding document folder where the logo image is stored is ...
2
votes
1answer
4k views

Where are the documents from the Documents tab in Lightning?

Our org has switched to Lightning recently and, as expected, there is no Documents tab. From what I've read the equivalent to Documents in LEX is Files. I would like to know where are the actual ...
2
votes
1answer
2k views

Download a pdf file onclick

I want to develop a visualforce page with "download pdf" link. So that when user clicks on the link, related pdf file will be downloaded. How would I set that up? The pdf file has already been ...
2
votes
1answer
451 views

Save text in Document object of Salesforce in ISO-8859-1/ANSI/ASCII format

Text in Document object of salesforce are being saved in UTF-8 now, but I need to save it in ISO-8859-1/ANSI format. When I do the following, and try to download the document and look at it's ...
2
votes
2answers
119 views

Documents in Customer Communties

Am trying to add help link in a visualforce page which points to pdf uploaded in documents tab.But looks like documents is not available in Communities.What's an alternative for adding this help ...
2
votes
2answers
176 views

Collaboration of Files

In order to manage Collaboration of Files, I am really confused about whether to use google drive or dropbox or anything else with salesforce. My needs are admin will upload documents, word document ...
2
votes
1answer
287 views

Parse XML fails with null object dereference

I have below code that fails to execute in developer console, I receive the following error: Attempt to de-reference a null object. Can someone please help here? Apex class: public class ...
2
votes
1answer
2k views

List of documents in 'My Personal Documents' folder

I'd like to know how I can get list of all the documents located in 'My Personal Documents' folder. For other folders I can write something like this: SELECT Id, Name FROM Document WHERE FolderId =:...
2
votes
1answer
1k views

Upload a file using <apex:actionFunction> integrated with JQuery

I have an html form that contains a file input, so I want to upload the selected file from this form using <apex:actionFunction> The problem is that I don't know how to pass the file to the ...
2
votes
1answer
129 views

REST Downloading a document Response Headers don't have Content-Length

I am using /Document/{id}/Body endpoint to download the file. The returned response headers don't contain a content-length header { which really is a norm, right ? } ... Does anyone know why that ...
2
votes
1answer
672 views

Can I Upload Documents from PHP Toolkit?

I want to upload files into the document library. Is it possible to do this with the PHP Toolkit?
2
votes
1answer
4k views

Difference between servlet.imageserver and servlet.filedownload

I have my images stored as documents. I am able to access them by both these urls servlet/servlet.imageserver?id=<record id>&oid=<orgid> servlet/servlet.filedownload?file=<...
2
votes
3answers
3k views

Sharing documents with partners in partner community

I have a partner community. I'm not sure what is the best way to share documents with them e.g. using Documents, Files or Content. I thought of using the Documents tab but even though the partner ...
2
votes
1answer
537 views

Need to give guest profile access to documents

I need to give the guest user profile access to view files/documents (PDF, Excel, Word, etc.). I have a public Customer Service/Napili community with Knowledge set up. Guest users can see the ...
2
votes
1answer
633 views

Bulk API - Upload documents (files and URL) through CSV

I have tried uploading files through CSV using Bulk API's createBatchWithFileattachment() call. It basically goes like this: createBatchWithFileAttachments(JobInfo jobInfo, InputStream batchContent, ...
2
votes
1answer
348 views

Uploading Document (files) to Attachment object

If I want to upload files into attachment object in SFDC, I can give the file path (drive location where file is available) in File location column and then upload to SFDC Attachment object. If my ...
2
votes
1answer
574 views

Way to use relative URL vs hard coding document ID?

How can you use a relative URL for an image file inside documents vs hard coding the document ID in HTML? I have an org to spin off templates that use images with the src linked to the document ID, ...
2
votes
0answers
41 views

Salesforce weekly data export and GDPR compliance

Many customers leverage the Weekly Data Export function to download Salesforce data. How can one still leverage this function while being GDPR compliant? Would uploading the zip folder to ...
2
votes
0answers
32 views

facing problem with Word 2016 , 2010 and 2013 table and text mismatch [closed]

I am facing a problem where I'm generating Word docs from custom VF pages, I'd built these pages for Word 2010 , however, all the tables and text are a little out of shape for Word 2016. This is ...
2
votes
0answers
401 views

Preview .doc document on visualforce page before downloading

I need showing preview .doc document before downloading, on visualforce page. After researching, I have seen google viewer and I have tried but I couldnt run it. Do you have an working example code ...
1
vote
1answer
625 views

Add watermark to PDF document [duplicate]

Is there any way to add watermark to certain PDF files stored in document folder? We would like to do a dynamic watermarking capability to the documents with confidential information of user who ...
1
vote
3answers
4k views

Display images from Salesforce Document folder

I currently managed to display some images(from salesforce Documents folder) on an extracted Excel sheet from Salesforce but I have hard coded the document Ids. So this might not work after creating ...
1
vote
2answers
635 views

URL redirect after attachement upload

I want to make a program where a user uploads any document. On uploading I want the user to be redirected to a folder. So here's what I have tried so far from salesforce documentations... public ...
1
vote
3answers
3k views

Access Document(pdf or doc) without Salesforce login

I have 3 Document records with pdf, word document & image respectively. I need to show the files outside Salesforce(i.e without salesforce login). All of the records have 'Externally Available ...
1
vote
1answer
175 views

Document.fullScreen API implementation in Lightning Web Components(LWC)

I was trying to achieve full screen on an element in Lightning Web Components but was unable to use Document.fullscreen API. I tried var elem = this.template.querySelector('svg'); if (elem....
1
vote
2answers
669 views

Can I display video in Lightning Component which is stored in Documents or SF Files?

With Static Resources it works fine, but if I'm trying to use Documents and Url like /servlet/servlet.FileDownload?file=0698E0000008w5e as source URL for <source> tag - it prevents me from ...
1
vote
1answer
557 views

Show formula field image in Visualforce Site

Image is showing up in internal visualforce page but not showing up in external visualforce site page.I have stored image in document and made it externally available and document folder is accessible ...
1
vote
1answer
2k views

How can I display a document image in a VisualForce page so it works in a managed package?

I am making a managed package that contains an app that uses a document type image as a logo. I use the same logo on a VisualForce page in the same package, but that file is actually stored as a ...
1
vote
1answer
312 views

Display only first 2 pages of pdf in browser

i have uploaded a pdf file using document object in salesforce. i am using the below code to display that file in my browser. my requirement is to show only the first two pages of that file in the ...
1
vote
1answer
579 views

Returning Image from Query

I have a query fetching a document which is an image. I want to assign the image to a field (URL). I am doing: Document doc = [select id, name,url, body from Document where name = 'image']; Object....
1
vote
2answers
656 views

How to update the document from the C#.net

I have upload the file from the c#.net by using the following code and document created successfully in Salesforce org. sforce.Document docvar = new sforce.Document(); docvar.Name = ...
1
vote
1answer
452 views

How to pass the XML as a url in DOMParser

I found the following details from the Reading and Writing XML Using the DOM in online salesforce. As in the page shows, following one is XML file. <address> <name>Kirk Stevens</...