Loading

How to prevent email notification: Your Content Delivery Has Been Viewed when someone public or internal users views or downloads the file for the first time

Data pubblicazione: Aug 21, 2026
Descrizione

Discover how to disable email notification: Your Content Delivery Has Been Viewed when a file is first viewed or downloaded by any user, whether public or internal. This guide will help you control alerts and reduce email clutter

Risoluzione

Background: How File Sharing Links Work

The diagram below describes how files are stored in the database, as well as how public links to files stored in Salesforce are generated.

Diagram showing how ContentVersion, ContentDocument, and ContentDistribution relate when a file is shared via a public link 

 

  • Each file in Salesforce is stored in ContentVersion, and there can be many ContentVersion records for a given file, representing the different versions of the same file over time.
  • ContentDocument always points to the latest version of the file.
  • A ContentDistribution link signifies the link between the file and the associated record.
  • A Content Delivery lets us convert documents such as PowerPoint and Word files into an optimized web-based version for easy online viewing, and is only available in Salesforce Classic.

In situations where we want to share files with external or public users who don't have access to Salesforce, we can generate a public link and share it with those users. Each public link generated for a file corresponds to a record in the ContentDistribution object in Salesforce. Whenever a user previews or downloads the content for the first time, we get the following email notifying us about the action taken by the user:

Example of the "Your Content Delivery Has Been Viewed" email notification

To stop receiving these emails, we need to set PreferencesNotifyOnVisit to False. PreferencesNotifyOnVisit is a standard field on the ContentDistribution object which controls whether the owner of the shared document is notified via email whenever an external or public user views or downloads the document.

There are multiple ways to disable this email alert:

  1. Via the Salesforce Classic UI
  2. Declaratively or programmatically via Apex or Lightning Flows

Option 1: Disable via Salesforce Classic

The following are the steps for disabling the email alert notification option via Salesforce Classic.

Step 1: Locate the File

On the Record Detail Page, navigate to the Files detail page under Notes & Attachments for the file you want to disable the alert for.

  • After switching to Salesforce Classic, search for the Files object and click on it
  • Then, upload any image or screenshot by clicking the Upload Files button

Upload Files button on the Files list view in Salesforce Classic 

Step 2: Open the Screenshot's Content Record

Click on the Screenshot link.

Screenshot link shown in the file's related list

 

Step 3: Go to the Content Detail Page

Click on the Go to Content Detail Page option.

"Go to Content Detail Page" link on the file preview

Step 4: Open Deliver Content

Click on the Deliver Content button.

Deliver Content button on the Content Detail page 

Step 5: Uncheck the Notification Option

Uncheck the Notify Me of First View or Download option and click Save.

"Notify Me of First View or Download" checkbox unchecked on the Content Delivery page

Option 2: Disable via Flow or Apex ### Using Lightning Flow

When using Lightning Flow, depending on your business use case, you can add an Update Records element and set the object to ContentDistribution. The record for which you want the notification disabled can be identified using ContentDistribution, ContentDocumentId, ContentVersionId, or whatever conditions you set in the Update Records element. Then, set the PreferencesNotifyOnVisit field to {!$GlobalConstant.False}.

Flow Update Records element setting PreferencesNotifyOnVisit to false on ContentDistribution 

Using Apex

When using Apex code, we first need to query the ContentDistribution object using the appropriate conditions, then programmatically set the value to False. Once set, we use a DML statement to update the record and disable the email alert.

Apex code querying ContentDistribution and setting PreferencesNotifyOnVisit to false 

About This Article

Written by: Meghesh Shenoy | Forum Ambassador. Meghesh Shenoy is a MuleSoft Ambassador and a Salesforce Forum Ambassador. He is a MuleSoft and Salesforce Certified Developer, carrying the knowledge of building automation solutions using Salesforce and MuleSoft. Meghesh is passionate about sharing knowledge and experience and also helping others sharpen and grow their MuleSoft & Salesforce skills together.

## Disclaimer

Submissions reflect only the opinions of the user who made available the Submission and not the opinions of Salesforce, regardless of whether the user is affiliated with Salesforce, and may contain or constitute products, services, information, data, content and other materials made available by or on behalf of third parties ("Third Party Materials"). Salesforce neither controls nor endorses, nor is Salesforce responsible for, any Third Party Materials, including their accuracy, validity, timeliness, completeness, reliability, integrity, quality, legality, usefulness or safety, or any applicable intellectual property rights. Any Submissions made available through any message board or forum in response to posted questions, or that otherwise purports to answer any questions, including any questions about Salesforce or Programs, are made available for your general knowledge only and should never be relied upon as answers to your specific questions (even if an answer is marked as a "best" answer or with any similar qualifications). You should always contact Salesforce support for answers to your specific questions. Salesforce has no control over Submissions, and is not responsible for any use or misuse (including any distribution) by any third party of Submissions.

If you have questions, tap into the wisdom of our entire Trailblazer Community here: https://trailhead.salesforce.com/trailblazer-community/feed

Numero articolo Knowledge

003600217

 
Caricamento
Salesforce Help | Article