Salesforce関連の記事を書いています。

  1. Salesforce

What are Salesforce input rules? Explanation and Examples for Beginners

Salesforce is a tool that helps companies manage data more efficiently, but without the proper rules in place, data can become inaccurate and impact the business. Validation Rules** address such issues.

Validation rules are a mechanism to check data before it is stored and prevent incorrect data from being registered. In this article, we will explain the basics of validation rules and their applications in an easy-to-understand manner, including specific formula examples so that even those new to Salesforce can understand what they are.


1. What are input rules?

Input rules play an important role in Salesforce data management. If data is entered that does not conform to the set criteria, an error is displayed and saving is prevented. This helps maintain accurate and consistent data.

For example:

  • A club application form, such as setting a “no acceptance without parental consent” rule.
  • A system that places a limit on school grades to prevent scores from exceeding 100 points.

In Salesforce, this can be easily achieved with input rules.


2. How input rules work

An input rule uses a formula to set a condition. If this condition is True, an error occurs and the data is not saved. Rules are automatically checked by Salesforce when they are saved.

Basic flow:

  1. User enters data.
  2. Input rules check conditions.
  3. If the condition is not met, an error is displayed and saving is aborted.

3. How to create an input rule

  1. Select an object: Select the target object (e.g., business meeting, account) from the Salesforce “Settings” menu.
  2. Create a new input rule: Click “Input Rule” displayed on the left side of the object edit screen. Click the “New” button displayed in the upper right corner of the screen.
  3. Set Rule Name: Enter a rule name using single-byte alphanumeric characters.
  4. Check Enable: Checked by default.
  5. Set Condition: Enter a formula.
  6. Set Error Message: Include an error message that is easy for the user to understand (e.g., “Phone number is required.”) Save: Saves the input rule.
  7. Save: Save the input rule.

4. Examples of commonly used input rules

4.1 Checking required fields

Displays an error if certain fields are left blank.

Formula Example:

ISBLANK(Phone)

Description:

  • Displays an error if the phone number (API reference name: Phone) is left blank.
  • Example error message: “Please enter a phone number.”

4.2 Date Consistency Check

Controls that the end date does not precede the start date.

Formula Example:

EndDate < StartDate

Description:

  • An error is displayed if the end date (API reference name: EndDate) is before the start date (API reference name: StartDate).
  • Example of error message: “Please set the end date after the start date.

4.3 Value Range Check

Displays an error if the amount is less than or equal to 0.

Formula Example:

Amount <= 0

Description:

  • Displays an error when the amount (API reference name: Amount) of the negotiation is less than 0.
  • Example of error message: “Please enter an amount of 1 yen or more.

4.4 Selection List Condition Check

Makes another item mandatory if a specific choice is selected.

Formula Example:

ISPICKVAL(StageName, "Closed Won") && ISBLANK(CloseDate)

Description:

  • If the stage (API reference name: StageName) is “Closed Won,” the completion date (API reference name: CloseDate) is required.
  • Example error message: “If the stage is “Closed Won”, please enter the completion date.

Supplemental information:

The item API reference name can be inserted by following the steps below. There is no need to go to the trouble of searching for the API reference name.


5. Advantages of Using Input Rules

5.1 Improved data quality

Input rules preserve accurate data by preventing incomplete or incorrect data from being registered.

Example:

  • Phone numbers and email addresses are entered correctly as required fields.
  • Limits on numerical items (e.g., amounts, discount rates) prevent incorrect data.

5.2 Ensure consistency in business processes

Smoothly facilitates the overall flow of business operations by preventing data that does not meet certain conditions from being registered.

Example:

  • If the stage is “contract conclusion,” the contract amount is required.
  • The proposal date is mandatory for a business meeting under proposal.

6. Points to note

When using input rules, please note the following points.

6.1 Keep rules to a minimum.

Setting too many input rules may confuse users. Narrow down the rules and set only the important ones.

6.2 Be specific about error messages.

If error messages are difficult to understand, users will not know what to correct. Try to make messages specific and easy to understand.

Bad example:
Error message: “An error has occurred.
Good example:
End date must be entered on or after the start date.


7. Best Practices for Entry Rules

  1. Clarify business requirements:
    • Identify the requirements for your business process and reflect them in the input rules.
  2. Thoroughly test:
    • After setting up the system, test it to make sure there are no problems in actual operation.
  3. Be aware of the user’s perspective:
    • Design conditions and error messages concisely so that users are not confused.

8. Conclusion

Salesforce input rules are an important tool to support operational efficiency while maintaining data accuracy. Formulas allow for flexible conditions and help improve data quality throughout the system.

Use the specific examples in this article to set up input rules that best suit your organization and help you better manage your data!

Salesforce recent post

  1. What are Salesforce input rules? Explanation …

  2. You must be using Office365 (Microsoft365) to…

  3. How to loop a specified number of times in a …

  4. How to create an item that only the record ow…

  5. How to have Salesforce automatically enter to…

関連記事

PAGE TOP