👷🔧 Storyforce is under early construction, many pages are half finished! 🔧👷
Playbook
Introduction

Introduction

Welcome to Storyforce! A repository of pre-crafted, bite-sized Salesforce stories that you can copy and replicate in your Salesforce implementations. 😁

Who is Storyforce for?

Storyforce is designed for Salesforce consultants who are well-versed in the platform and looking to streamline their workflow.

What is Storyforce?

Storyforce offers practical Salesforce solutions that are less verbose than Trailhead and blog-style content, yet more guided than standard Salesforce documentation.

All build tasks are presented in a concise and minimal format, without detailed explanations. It is assumed you can deduce the purpose of each step from the context.

How to use Storyforce?

A typical day in the life of a Salesforce consultant involves writing user stories and acceptance criteria, building the solution, and testing it.

Storyforce is organized in a similar way, with each section containing three key steps: Design, Build, and Test.

Example

Each section is made up of 3 steps 'Design', 'Build' and 'Test'

Design

User Story
As a Salesforce User
I want the system to prevent the Close Date from being in the past when an opportunity is changed to Closed Won or Closed Lost
So that I can ensure the data is accurate and up-to-date
Acceptance Criteria
Given I am on an Opportunity record page
When I change the opportunity stage to Closed Won or Closed Lost
Then an error message is displayed if the Close Date is in the past

Build

Rule Name: Close_Date_In_The_Past
Description: Prevent the Close Date from being in the past when the opportunity stage is Closed Won or Closed Lost
Error Condition Formula:

AND(
   ISCHANGED(StageName),
   CloseDate < TODAY(),
   OR(
       ISPICKVAL(StageName, "Closed Won"),
       ISPICKVAL(StageName, "Closed Lost")
   )
)

Error Message: Close Date cannot be in the past when closing an opportunity
Error Location: Close Date

Test

Steps

  1. Open an Opportunity record page
  2. Set the Close Date to a past date
  3. Change the stage to Closed Won or Closed Lost
  4. Click Save

Expected Results

  1. An error message is displayed
  2. The error message should read 'Close Date cannot be in the past when closing an opportunity'