Loading

How to prohibit free text entry for the activity subject in Salesforce

Udgivelsesdato: Jun 25, 2026
Beskrivelse

By default, Salesforce allows users to type any free-text value into the activity Subject field. You can restrict this behavior using an Activity Entry Rule, which forces users to select only from the approved Subject picklist values. This article covers the steps to configure that rule in both Salesforce Classic and Lightning Experience.

Løsning

Follow these steps to create an Activity Entry Rule that restricts the activity Subject field to approved picklist values only. If a user enters a value that is not in the allowed list, Salesforce displays the error message you configure.

Salesforce Classic

  1. Click Settings | Build | Customize | Activity | Activity Entry Rules.
  2. Click the New button.
  3. Enter a rule name in the Rule Name field, then enter the following formula in the Error Qualifications box.

This formula restricts the Subject field to only the allowed picklist values listed. If a user enters a value that does not match one of the approved subjects, Salesforce triggers the entry rule and displays your configured error message.

NOT( OR( Subject == "Call", Subject == "Email", Subject == "Other"))
  • Note: "Subject" is the Subject field API name. Do not change it.
  • Note: For "Call," "Email," and "Other," enter the exact selection list value names currently used in your org.
  1. In the Error Message field, enter the message to display to the user when the rule is triggered.
  2. In Error Display Location, select where the error message should appear on the screen.
  3. Click Save.

Lightning Experience

  1. Click the gear icon | Settings | Object Manager | Activity | Entry Rules.
  2. Click the New button.
  3. Enter a rule name in the Rule Name field, then enter the following formula in the Error Qualifications box.

This formula restricts the Subject field to only the allowed picklist values listed. If a user enters a value that does not match one of the approved subjects, Salesforce triggers the entry rule and displays your configured error message.

NOT( OR( Subject == "Call", Subject == "Email", Subject == "Other"))
  • Note: "Subject" is the Subject field API name. Do not change it.
  • Note: For "Call," "Email," and "Other," enter the exact selection list value names currently used in your org.
  1. In the Error Message field, enter the message to display to the user when the rule is triggered.
  2. In Error Display Location, select where the error message should appear on the screen.
  3. Click Save.
Yderligere ressourcer

Validation Rules

Vidensartikelnummer

000387217

 
Indlæser
Salesforce Help | Article