Oct 30, 2024
133 Views
Comments Off on Working with Files in Salesforce
0 0

Working with Files in Salesforce

Written by

Most data in Salesforce is stored as records in the Salesforce database for your organization (technically, Salesforce uses a multi-tenant architecture that uses a combined structure to store data from different organizations, but that’s a not how you experience it as a user). But some information you might want to store and share exists in files, and it probably doesn’t make sense to convert that information into fields in records. Thankfully, there are a number of ways you can work with your files in Salesforce.

Contents

  • Working with Files in Salesforce
    • Post your files to Chatter feeds
    • Attach your files to records
    • Share files via the Salesforce cloud
    • Connect your files to external file systems
    • Analyze file usage through file reports
  • File Sizes
  • File Permissions
    • File Permissions by Relationship
  • File Sharing
    • File Sharing Status
    • File Sharing Actions
    • Restrictions on Sharing
  • File Versioning
    • Who Can Do It
    • Restrictions on Versioning
  • Other Strategies

Working with Files in Salesforce

What does it mean to work with files in Salesforce? There are a number of things you might want to do:

Post your files to Chatter feeds

Chatter feeds are messaging areas where you can collaborate with coworkers. Posting a file to a feed allows you to work together on it as a team.

Attach your files to records

Some files are associated with records and should be kept together.  For example, you might want to keep a non-disclosure agreement (NDA) with a customer’s account record by attaching it there.  That way, users who have access to the account record can at least see the NDA.  You may even grant them additional permissions – more on that later.

Share files via the Salesforce cloud

External users like your customers may need access to some of your files.  You can share the files with them using the Salesforce cloud.

Connect your files to external file systems

Your company may have its own file system.  If you want a file accessible both through Salesforce and through an external file system, you can connect it there.

Analyze file usage through file reports

If you want to check out how people are using a set of files, you can run a file report to view and analyze the data.

File Sizes

Files uploaded through the web interface may be up to 2 GB.  Files uploaded through a mobile device may be up to 100 MB.  It probably comes as no surprise that you may not want to work with huge files on mobile.

File Permissions

File access is guided by a set of different permissions on a file:

  • View or preview
  • Download
  • Share
  • Attach to a post
  • Upload new version
  • Edit details
  • Change permission
  • Make private
  • Restrict access
  • Delete

File Permissions by Relationship

A user’s relationship to a file drive which permissions the user holds for the file.  Let’s go through them.

Owner

The designated file owner has full permissions and can do whatever they like with the file.

Administrator with “Modify All Data” Permission

A user admin with the “Modify All Data” permission enabled can do everything the file owner can do, unless the file resides in a private library.  In that case, the admin has no access to it.

Administrator with “View All Data” Permission

A user admin with the “View All Data” permission enabled can view or preview the file, unless the file resides in a private library.  In that case, the admin has no access to it.

Collaborator

A user can become a “collaborator” on a file when the owner shares the file with them and chooses to grant them collaborator status.  A designated file collaborator has the following file permissions:

  • view or preview
  • download
  • share
  • attach to a post
  • upload new version
  • edit details
  • change permission

Viewer

A “viewer” has the following file permissions:

  • view or preview
  • download
  • share
  • attach to a post

Viewers include groups and their members when the file has been posted to a group feed.

File Sharing

File sharing is a way to collaborate on a file with other users in your company (and therefore change the relationships of other users to a file).  There are even ways to share files externally.  To understand sharing, we’ll need to go through broad classes of sharing, file permissions related to sharing, user relationships to a file through sharing, and sharing actions you can take.  Let’s tackle these ones by one.

File Sharing Status

There are three broad classes of file sharing status: private files, privately shared files, and files shared with your company.

Private File

A private file hasn’t been shared with anyone except the file owner, or the owner has removed all its previous posts and shares.  Some administrators may still be able to view the file if they have the “Modify All Data” permission.  I say “may,” because the file owner can prevent even these administrators from viewing the file by keeping it in a private library.

File metadata is not treated the same as the file itself, however.  File metadata is not private even when the file is.  File metadata, if you’re not familiar, is information about the file (e.g. its name and keywords), but not the file’s contents itself.

Privately Shared File

A privately shared file is a file that has been shared with specific people or groups.  It may have been shared through Salesforce sharing, by creating a file link and sharing the link, posting the file to a feed on a record (as opposed to a public feed), or publishing it to a private library.

Administrators with the “View All Data” or “Modify All Data” permission can also find and view the file.

File Shared with Your Company

Files posted to public feeds that all users in your company can see are considered shared with your company.  Like with the feeds themselves, all users in your company can view the file.

File Sharing Actions

Files are shared or unshared through one of a set of file sharing actions.  Let’s take them one at a time.

Share Privately with Records

This is also known as attaching a file to a record. When you want to associate a file with a record, this is the way to go. This is what we discussed above in Attach Your Files to Records.

Share Privately with Individuals

When you share a file privately with an individual, you can decide whether to grant that individual Collaborator or Viewer status.

Share Privately with Chatter Groups

You can share a file with public or private groups in Chatter.  When you share with a private or unlisted group, all members of the Chatter group become Viewers of the file and the file is considered privately shared.  When you share a file with a public group, all Chatter users in your company become and the file is considered shared with your company

Share with Libraries

In order to share a file with a content library, your admin must have this feature turned on for your org by enabling the setting “Files user interface allows sharing files with libraries.”  The benefit of sharing a file with a library is that is it takes advantage of the permissions settings of the library you choose.

Share via Link

Files can also be shared by generating an encrypted URL link to the file and sending it to whomever you like.  The link is public, so you can share a file this way with individuals both within and outside of your company, including customers and partners.

When someone clicks on the link, it opens a web-based version of the file.  The file can then be viewed and downloaded, but link recipients are not Collaborators.

After you’ve created a file link and sent it out, you can still delete it.  Once you do, anyone who has received the link will no longer be able to access the file unless they’ve already downloaded it.  And if you create a new link, it will be different from the previous one, so only recipients of the new link will have file access.

Sharing by link is enabled by default for most Salesforce Org.

Make Private

Once a file has been shared, the owner still has the ability to make it private again.  In Salesforce Classic, this is a simple action you can take.  If you choose to make a file private, it will be removed from any posts it’s attached to and from everywhere it’s been shared.  If you’ve shared a link to the file in Chatter, the link is deleted.

There are three special cases to consider, however.  First, files that originate in a Salesforce CRM Content Library won’t be removed from the library itself.  Second, if the file was shared using a content delivery, the content delivery will survive when you make the file private, though it will be inaccessible.

If a file has been shared with a record, you can also make it private without un-attaching it from the record.  If you do so, other users viewing the record won’t see the file even though it’s attached.

In Salesforce Lightning, making a file private is a manual process.  You’ll need to remove any access granted, remove it from all Chatter posts, and delete any links you’ve created.

Prevent Others from Sharing and Un-sharing a File

Users with the restrict access file permission on a file can turn off the ability for other users to share or un-share it.  By default, anyone who can see a file can share it, so this will need to be explicitly invoked.  Note, however, that it does not affect any sharing already made, only future attempts at sharing or un-sharing the file.

Restrictions on Sharing

You, unfortunately, can’t share a file unlimited times.  The maximum is 100 shares, regardless of whether you’re sharing it with a record, a person, or a group.

If you’re running up against this limit, there are other strategies for collaborating on a file.  You can create a public link to it and send it to whomever you like.  Anyone with the link can download and view the file.

You can also post the file to your Chatter feed, which makes the file public to all Chatter users in your company.

File Versioning

When working with files in Salesforce, you can upload new versions.  Salesforce will track all versions of a file for you.  When you upload a new version, it actually replaces the previous version as the active file, but all versions are still available if you need them.

Who Can Do It

Not everyone with access to a file can upload a new version.  Only the file owner, designated collaborators, and administrators with the “Modify All Data” permission can do so.  But no matter who uploads the new version, the file owner will not change.

Restrictions on Versioning

Salesforce can track many versions of the same file, but not an unlimited number.  You can have up to 2,048 versions.  If you’re hitting that limit, you’re in a select group indeed.

 

Article Categories:
Salesforce