Associating a File Upload in Salesforce to an Account

Salesforce enables uploading and association of file attachments with accounts, opportunities and other tape types.

Attachments are visible in the Notes & Attachments department in record details views. They can be added to both standard and user-defined objects — the latter is important for custom objects provided by packages extending the standard CRM functionality (for instance, most Nextian Service Analyzer custom objects such as work orders support attachments).

The standard attachments work reasonably well, especially when using the new Lightning 'Files' implementation that replaced the legacy, archetype 'Attachments' (migration is performed automatically past switching to the Lightning experience).

However, for businesses that rely heavily on documents, the standard Salesforce functionality may be insufficient due to:
  • Storage limitations — Salesforce storage is express past the plan and number of users (typically 2GB per user and 10GB per org) while most 3rd-party systems offering unlimited space
  • File size limitations — 2GB for Lightning and 25 MB for Classic (see this link for details)
  • Storage cost — third party systems are unremarkably more price constructive
  • Ability to search content of attached documents in popular formats (.medico, .pdf, .xls, etc.)
  • Sharing documents with other Information technology systems
  • Execute complex certificate approval flows
  • Organize documents in sub-folders — Salesforce attachments are added to an object as a list, while third political party systems usually offering an power to create a binder structure underneath a record
  • Limited user experience — the standard Salesforce attachment interface is relatively simple and not geared towards efficient use
  • Content upload/download speeds — specialized document systems offer college speeds (upward to iii times, based on our measurements)
  • Lack of collaboration features — e.g., document checkout, lock, run into who is editing, open up and salve via a desktop awarding, etc.

Warning In cases when storage limitations are the chief upshot, document archiving rather than expanding extra storage infinite may be worth because.

Available options

Depending on business objectives and needs, all the options for improving file attachments tin can exist categorized as follows:

Option Vendors/Packages Pros Cons
Using born attachments and
purchasing boosted storage
No changes required (only pay). Does not address whatever limitations outlined above.
Using external file storage
  • BOX.COM
  • Dropbox
  • Amazon S3
  • Google Bulldoze
  • Salesforce Files Connect (east.one thousand., with Microsoft SharePoint)
Larger (in some cases unlimited) storage, good search capabilities.

Expert integration can enable users to spend 100% of their work time in Salesforce without having to switch betwixt the systems.

Coding in Lightning and Noon may be required.

Document migration from Salesforce to the new storage system might be a challenge.

Integration with a fully-blown Document Direction Organization (DMS)
  • DocuSign CLM (f.one thousand.a. SpringCM)
  • S-drive
Has all the pros of using external file storage enhanced with DMS features (document generation, workflows, approvals, etc.).

All-time choice for businesses building their processes around document flows.

Usually a large projection, associated with a DMS rollout.

Built-in attachments

Understanding congenital-in Salesforce attachments is a good starting time step for choosing a replacement and agreement potential security and migration issues.

Firstly, object and file storages are separate (Setup → Visitor Data):

Salesforce Available Storage Information

Salesforce Available Storage Information

Understanding Salesforce attachment structure

Attachments are linked to documents via the post-obit tables:

ContentDocumentLink → ContentDocument → ContentVersion

ContentDocumentLink links parent object ids such as opportunity, business relationship, etc. with the documents. The following SOQL query can be used to retrieve links for any Salesforce object:

            SELECT            ContentDocumentId, /* id of document linked to parent*/   ShareType          /* sharing mode, e.grand. 'V' view just, 'I' infer from tape permissions */            FROM            ContentDocumentLink            WHERE            LinkedEntityId = '0015g000003YnHlAAK'  /* parent object id, = or IN operators must exist present */          

The LinkedEntityId in the query is an object of the parent object.

Important ContentDocumentLink can be merely queried with a specific id or a set of ids via IN clause. Examining larger sets of attachments requires downloading via Data Loader, backup tool or database replication.

Pro Tip Object primal (the first three characters of LinkedEntityId) can be used to obtain statistics on attachments per object type.

The value of ContentDocumentId from the query above can be used to query document backdrop:

            SELECT            Title,    FileType,    FileExtension,    Description            FROM            ContentDocument            WHERE            Id = '0695g000000gG0UAAU'          

This does not however return the document content. Since content is versioned and has to be pulled from the ContentVersion table:

            SELECT            Id,    IsLatest            FROM            ContentVersion            WHERE            ContentDocumentId = '0695g000000gG0UAAU'          

Attachment security model

The ShareType field on ContentDocumentLink (in the query above) determines how a particular attachment is shared:

  • '5' – creator full admission, other users view only
  • 'I' – infer from object (i.due east., follow permissions on the particular tape)
  • 'C' – creator total admission, other users must be granted access

The Salesforce org default is '5' however it tin can be changed to 'I' via Setup → Feature Settings → Salesforce Files → General Settings and checking Set file access to Set By Record for files attached to records:

Salesforce Files Settings

Unfortunately, this option works for new attachments only and existing records must be inverse with the Data Loader or other tool.

Important Most external storage add together-ons (e.g., BOX.COM) support some sort of equivalent of the 'I' sharing type.

Using external file storage — considerations

The scope of actual work will depend on the selected storage blazon and scope.

For example making Google Drive or Microsoft SharePoint files bachelor for private users via Files Connect is a considerably smaller effort than a complex BOX.COM integration.

Regardless of external storage chosen, a typical integration delivered by Nextian involves:

  • Modifying Lighting tape pages to embed new external access components
  • Migration of existing documents from Salesforce native to external storage attachments
  • Optional migration of documents from other sources
  • Automated creation of documents folders and sub-folders for new records
  • Creation and association of folders for existing records that do non accept attachments yet
  • Authoritative lighting actions — at that place are chances that things will go wrong then actions like 'Create Folder Structure' demand to be made available to system administrators
  • Security and audit configuration

Salesforce Account With External File Storage (BOX.COM)

Salesforce Account With External File Storage (BOX.COM)

It is easy to notice from the scope above that some evolution in APEX and Lightning is involved. Likewise, certificate migration from other sources than Salesforce usually requires orchestration of Salesforce REST API, storage API (some vendors offer a SDK making things much easier), data transfers and migration logic written exterior Salesforce, due east.g., in Python, Java C# or other programming language.

All of these require a trusted evolution partner.

Conclusions

The choice of alternative external file storage for Salesforce can be hard due to a big number of options. Implementation and file migration may be a considerable endeavor and require expert projection planning.

Nextian provides Salesforceconsulting,implementation andmanaged services, and has extensive experience optimizing Salesforce storage likewise as storage implementations.

Contact us today to detect out how we tin help you!

stockardtralmot.blogspot.com

Source: https://nextian.com/2021/03/21/overcoming-salesforce-attachment-limitations-with-external-file-storage/

0 Response to "Associating a File Upload in Salesforce to an Account"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel