RevOps Docs for Startups
  • Welcome
  • Getting Started
    • Quickstart
    • About LeanScale
  • Growth Modeling
    • Building a Growth Model
      • Growth Model Assumptions
      • Growth Model Approaches
      • Growth Model Segmentations
    • Sales Capacity Plan
    • Marketing Plan
    • Customer Success Plan
  • Go-to-market Lifecycle
    • Go-to-Market Lifecycle
    • Lead Lifecycle
    • Sales Lifecycle
    • Customer Lifecycle
    • Proof of Concept Lifecycle
    • Lifecycle Measurement
  • Lead Attribution
    • Attribution Overview
    • Lead Source Taxonomy
  • Measuring Metrics
    • Reporting and Data Analytics
    • Sales Metrics
      • Created Pipeline
      • Weighted Pipeline
    • Marketing Metrics
      • Lead Impact Matrix
      • CAC to LTV
    • Customer Success Metrics
      • Net Retention
    • Partnership Metrics
    • Presenting Metrics
  • GTM Tech Stack
    • GTM Tech Stack Overview
    • When To Buy New Systems
    • Driving System Adoption
    • CRM Considerations
      • User-Oriented CRM
      • Data & Reporting CRM
      • Security-Focused CRM
  • Aligning Sales/Marketing
    • Alignment Overview
    • How to Align?
    • What is an SQL?
    • Building Marketing Operations
    • Defining GTM Process
    • Interviewing GTM Leaders
    • Finding The Right Talent
  • System Demos
    • Data Enrichment
      • Clay
      • Traction Complete
    • Conversational Intelligence
      • Gong
      • Unthread
    • CPQ
      • Dealhub
      • Salesbricks
    • Data Analytics
      • RevVue
      • QFlow
  • CRM Tips
    • Salesforce
      • Create Opp from Contact
      • Validation Rules in Flow
      • Roll Up Summary Field
      • Close Date Change Counter
      • Lead Stages
      • Sales Stages
      • Customer Stages
      • Next Step Fields
      • Lead Source Taxonomy
      • Proof of Concept Stages
      • Displaying Record Information
      • Display Dynamic Lists
      • Messages to End Users
      • Create Custom Buttons
      • Tips for Data Loader
      • Salesforce Inspector Reloaded
      • SFDC Navigator for Lightning
      • Bypass Validation Rules
      • Sales Manager Notes Field
      • Renaming Fields and Objects
      • Getting Faster to Record ID
    • Hubspot
      • Disable Picklist Options
      • Create Yesterday's Date
      • Create Today's Date
  • Strategic Walkthroughs
    • Revenue Operations Flywheel
    • Post-Fundraise Playbook
    • Building Board Decks
    • Building Dashboards
      • CEO Dashboards
      • Executive Dashboards
      • Marketing Dashboards
      • Sales Dashboards
      • CS Dashboards
      • Funnel Analytics
    • ChatGPT as a Salesforce Admin
    • Sales Commission Plans
    • Building Sales Territories
Powered by GitBook
On this page

Was this helpful?

  1. CRM Tips
  2. Salesforce

Create Custom Buttons

PreviousMessages to End UsersNextTips for Data Loader

Last updated 6 months ago

Was this helpful?

How to Create a Custom Button in Salesforce to Improve User Experience

Overview

This guide provides step-by-step instructions on creating a custom button in Salesforce to enhance the user experience. The use case demonstrated in this guide is creating an easily accessible button that allows sales users to input descriptions into opportunity records more efficiently.

Prerequisites

  • A Salesforce account with the necessary permissions.

  • A screen flow with three elements:

  • Record ID variable (text type, available for input)

  • Get Records element to store opportunity data

  • Screen element to allow users to input a new description

  • Update Records element to update the opportunity with the new description

Step-by-Step Guide

1. Create a Screen Flow

  • Create a new screen flow in Salesforce.

  • Add the following elements to the flow:

  • Record ID Variable: Create a text variable named "recordId" (ensure the exact spelling matches). This variable will be used as a placeholder for the opportunity ID and must be available for input.

  • Get Records Element: Use this element to store all opportunity data. Set the object to "Opportunity," the ID field to "recordId" (the variable created in the previous step), and select "Get only the first record." You can choose to store all fields or just specific fields like the description.

  • Screen Element: This element allows users to input the new description. Use a text component, hide the header, and make the text field required. Set the default value to {!opportunity.Description} (replace "opportunity" with the API name of your opportunity object) to display the existing description as a placeholder.

  • Update Records Element: Use this element to update the opportunity. Select the opportunity object, filter by ID using "recordId," and update the description field with the value from the screen component (e.g., {!Place_Update_Description}).

2. Create a Custom Action

  • In the Opportunity object manager, click on "Buttons, Links, and Actions."

  • Click on "New Action."

  • Choose the "Opportunity Update Description" screen flow created in the previous step.

  • Enter a label (e.g., "Update Description") and click "Save."

3. Add the Custom Button to the Opportunity Page

  • Go back to the Opportunity page layout.

  • Click on "New Action" next to the existing buttons.

  • Select the "Update Description" action created in the previous step and click "Done."

  • Position the button as desired and click "Save."

4. Test the Custom Button

  • Refresh the Opportunity page.

  • The custom button should now be visible.

  • Click on the button to open the screen flow.

  • The existing description should be displayed as a placeholder.

  • Edit the description and click "Save."

  • The description of the opportunity should be updated accordingly.

Additional Notes

  • This guide demonstrates a basic example of creating a custom button for the Lightning Experience. For the Salesforce Classic interface, a different approach may be required.

  • The use cases for custom buttons are extensive, including creating new records, updating multiple fields, utilizing custom fields, and more.

  • Custom buttons can greatly enhance the user experience by providing quick and easy access to frequently performed actions.