Attachments to and from Dynamics 365 Business Central

We are able to support attachment transfers to and from Dynamics 365 Business Central. The below product update blog page will explain the required steps in order to transfer your attachments to and from Business Central. As prerequisites, please make sure that the source and destination tables are available in both systems. If they are not available yet, you can make them available directly in your Business Central and Salesforce environments. 

Support for attachments from and to Microsoft Dynamics 365 Business Central

In Salesforce, ContentVersion and related objects such as ContentDocument and ContentDocumentLink form part of the platform's Content Management system, allowing for the storage and management of files and documents.

1. Key Salesforce File Objects:

  • ContentVersion:

This object represents a version of a file in Salesforce. Each time a file is uploaded or a new version of an existing file is added, a new ContentVersion record is created. A ContentVersion stores the file's metadata, such as file name, file size, content type (MIME type), and the actual file data (as a base64-encoded binary blob).

  • ContentDocument:

This is the core object that represents the file itself in Salesforce. The ContentDocument object is linked to one or more ContentVersion records. A ContentDocument acts as the parent object for all versions of a particular file. If a file has multiple versions, each ContentVersion record will reference the same ContentDocument. ContentDocument has fields that describe the file itself, such as its title and description, but does not store the file data directly.

  • ContentDocumentLink:

This object defines the relationship between ContentDocument and other Salesforce records, such as Accounts, Opportunities, or custom objects. It essentially links the file (represented by ContentDocument) to a specific Salesforce record. You use ContentDocumentLink to associate a file with a particular record, making it visible and accessible within the context of that record.
------------------------------------------------------------------------------------------------------------------------------------

2. Access Control and Permissions:

  • Files are subject to the standard Salesforce sharing and security model. Only users with appropriate permissions can access files associated with specific records.
  • Files linked to records might be subject to the sharing rules of those records (e.g., an Opportunity file might be restricted to users who have access to that Opportunity).

------------------------------------------------------------------------------------------------------------------------------------

3. Sharing Files:

  • Files (via ContentDocument) are subject to sharing and visibility rules. You cannot share files arbitrarily with users unless the ContentDocumentLink explicitly allows it.

------------------------------------------------------------------------------------------------------------------------------------

4. Custom Fields Creation on Salesforce Key objects:

  • ContentDocument and ContentDocumentLink are part of Salesforce's Files and Content Management system, which is tightly integrated into the platform’s architecture. These objects are more standardized, and their field structure is controlled by Salesforce to maintain system integrity. Salesforce doesn't allow you to extend these objects with custom fields directly. 
  • Custom fields can be created on ContentVersion and viewed in the Files or Attachments user interface, which is the correct approach for tracking additional metadata related to files uploaded to Salesforce.