本文已参与「新人创作礼」活动,一起开启掘金创作之路
前言
我们知道Salesforce提供了很多标准文件或内容管理对象,从中选用对的对象能使我们方案的实施事半功倍,本篇将结合现实中使用的情况来探索管理文件和内容的各种方法的差异。
对象比对
| 对象类型 | Files | Content | Document | Attachment | Knowledge |
|---|---|---|---|---|---|
| 用途 | Upload, store, find, follow, share, and collaborate on files | Publish, share official corporate files with coworkers and deliver them to customers | Store web resources, such as logos, and other VFP materials in folders without attaching them to records | Attach files to records from the Attachments related list on selected detail pages | Create, manage articles in a knowledge base. Internal users and customers can quickly find and view them |
| 常见用例 | Upload, store a file privately until you're ready to share it. Share the file with coworkers and groups to collaborate and get feedback. Attach files to posts in a Chatter feed | Create, clone, or modify a sales presentation and save it so only you can see it and work on it. When you're ready, publish it so other users in your company have access to it. Create a content pack and send it to customers | Add a custom logo to meeting requests by uploading your logo to the Documents tab | Add a file to a specific record, like an event, marketing campaign, contact, or case by attaching it on the Attachments related list | Write, edit, publish, and archive articles using the Articles Management tab, or find and view published articles using the Articles tab. If Salesforce Knowledge is enabled in your Customer Portal, partner portal, Service Cloud Portal, or Lightning Platform Sites, customers and partners can access articles. Create a public knowledge base so website visitors can view articles |
| 支持文件类型 | All | All | All | All | All |
| 最大文件大小 | 2 GB | - 2 GB- 2 GB (including headers) when uploaded via Chatter REST API and REST API- 38 MB when uploaded via SOAP API- 10 MB when uploaded via BULK API and VFP | - 5 MB- 20 KB for a custom-app logo | - 25 MB for file attachments- 2 GB for feed attachments | 5 MB |
其他要点
- CRM Content Library cannot be created in LEX yet
- CRM Content delivery not available in Lightning but File can be shared with external user using Link
- File supports versioning
- File can be related with multiple records.
- Files from Content Library displayed in file
- Content from external file service like Google, Box appears in Files
- External user can only view or download file but cannot edit or update
- File supports granular level sharing. It would be shared with anyone who has access to parent record. If you want to share with broad audience, it can be shared on chatter.
- Files yet does not support being used as attachment in Email Templates. If you are using Document in Email template, then keep it in Document
- Document tab is not available in LEX
- Documents should be replaced by File
- Attachment and Files are two different objects, so two different related lists.
- Attachment can be viewed in Lightning in Notes & Attachment related list
- Attachments cannot be created in LEX, we should not use Attachments in future
- To migrate existing Attachment to Files, use this AppExchange from Salesforce Labs
Note: Attachment / Note -> File
参考资源
官方文档:Differences Between Files, Salesforce CRM Content, Salesforce Knowledge, Documents, and Attachments
博客:Summary of Attachment, Document, Content Library and Files in Salesforce