Uploading Documents, Attachments, and Salesforce Files

  • iPad

Users can store and view documents offline in the Documents tab as well as the Attachments tab. Veeva CRM does not support uploading attachments from cloud storage apps on the iPad platform, including when users go online in the embedded browser.

In the Lightning Experience and for Lightning-enabled users on mobile devices, attachments are uploaded as Salesforce Files. Users cannot upload documents to the Documents tab on mobile devices. See Using Salesforce Files and Attaching Salesforce Files on Mobile Devices for more information.

The Documents tab displays in the Sunrise bar on the home page if there is at least one file available for offline viewing in a visible folder. The user can toggle between folders to view their contents, and can select a row to view the file in an embedded preview window.

The tab does not display if files do not exist.

iPad users can also use this tab to display all active Approved Documents of the Related Piece document type in Vault. If these are the only available documents on the device, the tab is relabeled Approved Documents. Windows users cannot display Approved Documents from this tab.

All files in the Documents tab automatically rotate based on the orientation of the device.

The Attachments related list is the same as the My Documents tab, except the files are not stored in folders. Attachments display in the associated program outside of CRM. To return to CRM, navigate back to the application.

Sharing Files

When viewing a file in the embedded viewer on the iOS platform, the user can print the document or display it in another app that supports the same file format. For example, if the user has access to a PowerPoint file in CRM for iPad and has Keynote installed on their iPad, then the preview window displays an option to open the file in Keynote.

The sharing functionality is specific to iOS and cannot be disabled. However, iOS allows configuration profiles to determine which applications are visible in the sharing panel.

Configuring Documents, Attachments, and Salesforce Files

Configuring Attachments is a two-step process. First, the VMOC record for the Attachment object determines which attachment records are downloaded to the user’s device at the time of sync. The default filter restricts these to signature graphic images, which are attachments of the Product_vod object. Attachments are generally included in the sync by setting the Include Attachments check box on the VMOC for the parent object. There is also a Full-Sync Attachment VMOC entry, that is specifically intended to sync particular Veeva-specific Attachments across all object types.

The next step is to choose which individual objects should have attachments available and add the Notes & Attachments related list to the page layout. Then, set the Include Attachments field to TRUE on the corresponding VMOC record for those objects. This will trigger the download of the attachment record, but not the actual file because attachments always follow the on demand model. The actual file is downloaded to the user’s device at the time they tap it from the related list. Once downloaded, the attachment can be viewed without an active network connection.

Refresh Users databases to sync down attachments that were created before the Include_Attachments_vod field was set to TRUE on the VMOC record.

Required VMOCs to View Documents

Object Name



Exclude Field List (on demand only)

Where Clause


Full Sync

  • iPad
  • Windows Tablet


WHERE (Name like 'vmobile-image%' or Keywords like '%offline%')


Full Sync

  • iPad
  • Windows Tablet

WHERE Type = 'Document'

Making Documents Visible Offline

Individual files are made visible offline by adding the text offline to the Keywords field on the document record. Administrators can expose files in public folders to users by adjusting the visibility controls on each folder record. Users always have visibility to their private My Personal Documents folder if they have view privileges on the Document object. Files in this folder cannot be shared with other users.

Deleted attachments may still display in the offline device if an incremental sync is done immediately after deleting the attachment online. Accessing an attachment offline that was deleted online displays an error. Veeva recommends waiting several minutes before performing an incremental sync after deleting attachments online.

Internal and external hyperlinks in pdf documents are retained.

The offline setting affects all users with visibility to the file. It is not possible to restrict offline visibility by user or profile.

Veeva CRM also supports the ability to download files from external sources. An administrator can reference a URL to a file rather than upload the actual file when creating a new document record. The file from the URL location is downloaded to the device when offline and downloadurl display in the Keywords field. Be sure to separate the keywords with a comma. Externally sourced files behave the same as normal files on the device.

Documents can be downloaded during sync or accessed on demand. In the on demand model only the metadata describing the document is downloaded during sync. The actual file is only retrieved from the server when the user wishes to view the document, which means the device must have an active network connection at that time.

After a document is downloaded, it can be accessed offline without a network connection. If a document is updated on the server, the user is forced to download the new version from the server the next time they want to view the document after sync. This is to ensure users are always looking at the most recent available version.

The decision to configure the on demand model is based on the size and number of documents the user can access offline. If users have access to a limited number of small documents, the additional time to download them during sync is manageable. However, if the user has access to many documents in several folders or very large files, the on demand model is a better choice.

To enable the on demand model for documents, add the Body field to the Exclude Field List field on the VMobile Object Configuration record for the Document object. This prevents the Body field, which contains the actual file, from being included in the sync process.