Slaesforce FAQ

how to update contentversion salesforce apex

by Christina Schaden Published 2 years ago Updated 2 years ago
image

Edit either a class or trigger, and click Version Settings. Select the Version of the Salesforce API. This is also the version of Apex associated with the class or trigger. Click Save.

Full Answer

How do I set the Salesforce API and apex version settings?

To set the Salesforce API and Apex version for a class or trigger: Edit either a class or trigger, and click Version Settings. Select the Version of the Salesforce API. This is also the version of Apex associated with the class or trigger. Click Save. To configure the package version settings for a class or trigger:

What is content version in Salesforce?

ContentVersion. Represents a specific version of a document in Salesforce CRM Content or Salesforce Files. This object is available in versions 17.0 and later for Salesforce CRM Content documents. This object is available in versions 20.0 and later for Salesforce Files.

What version settings are saved for managed packages in apex?

If the Apex class references components, such as a custom object, in installed managed packages, the version settings for each managed package referenced by the class is saved too.

Who is the current owner of the document in Salesforce?

The user is the current owner, or has either the “Modify All Data” or "Manage Salesforce CRM Content” permission enabled. The user has the “Manage Library” permission enabled for the library containing the document.

image

How to apply tags to a contentversion record?

To apply tags to a ContentVersion record, set a value in the TagCsv field. For example, setting this field to one,two,three creates and associates three tags to that version.

What version of Apex is download handler?

In API version 39.0 and later, custom Apex download handlers can be created that can control access to documents. See the Apex Developer Guide for more information.

How to delete tags in ContentVersion?

To delete all tags from a ContentVersion you perform a standard API update by setting the field to null.

What does SOQL return?

SOQL queries on the ContentVersion object return all versions of the document. SOSL searches on the ContentVersion object return only the most recent version of the document.

How big can a file be uploaded via API?

The maximum file size you can upload via the SOAP API is 50 MB. When a document is uploaded or downloaded via the API, it is converted to base64 and stored in VersionData. This conversion increases the document size by approximately 37%. Account for the base64 conversion increase so that the file you plan to upload is less than 50 MB after conversion.

Can you edit documents in Salesforce CRM?

Customer and Partner Portal users can only publish , version, or edit documents if they have a Salesforce CRM Content feature license.

When uploading a document from your local drive using the Data Loader, do you specify the path?

When you upload a document from your local drive using the Data Loader, you must specify the actual path in both VersionData and PathOnClient. VersionData identifies the location and extracts the format and PathOnClient identifies the type of document being uploaded.

image
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9