Automation Champion

Automating Salesforce One Click at a Time
Automation Champion
  • Home
  • About Me
    • Testimonials
    • Resources
  • Process Builder
  • Salesforce Flow
  • Pardot
  • Apex
  • Training Details
    • Salesforce Administrator
    • Salesforce Advanced Administrator
    • Platform App Builder
    • Lightning Flow
    • Pardot
    • Sales Cloud
    • Service Cloud
    • Community Cloud
    • Hands-on Excercises
  • My Books
  • Contact Me
  • Tag: BR_ENCODED_ Process Formula

    • Getting Started with Process Builder – Part 40 (Adding a Line Break in Process Builder Formula)

      Posted at 3:00 AM by Rakesh Gupta, on August 6, 2015

      Big Idea or Enduring Question:

      There is a formula function called BR() that allows us to insert a line break into text formula expressions or string of text, As shown in the following screenshot:

      The expected result in the formula field is:
      LastName
      FirstName

      But you will get the actual result similar to the following line because of the known issue (https://success.salesforce.com/issues_view?id=a1p300000008YkZAAU)

      LastName_BR_ENCODED_FirstName_BR_ENCODED_

      Objectives:

      After reading this blog post, the reader will be able to:

      • How to write a formula in process builder to add a line break 

      Business Use Case

      Pamela Kline is working as a System administrator at Universal Containers (UC). She wants to update the Lead’s Description field with Lead’s Last Name in the next line of Lead’s First Name.

      Automation Champion Approach (I-do):

      While this can be solved using various automation tools like Apex or Flow, but we will Process Builder to solve the business use case. One workaround I have found is to use the Custom Label and SUBSTITUTE function in the process builder formula. 

      Let’s begin building this automation process.

      Guided Practice (We-do):

      There are 5 steps to solve Pamela’s business requirement using Lightning Flow. We must: 

      1. Creating a custom label to store (-) 
      2. Define process properties
      3. Define evaluation criteria
      4. Define process criteria
      5. Add action – update records 

      Step 1: Creating a Custom Label 

      1. Click Setup.
      2. In the User Interface, type Custom Labels.
      3. Clicks on the New Custom Label button.
      4. Enter Short Description the Name will auto-populate. 
      5. Now enter the — in the Value.
      6. Click Save.

      Step 2: Define Process Properties

      1. Click Setup.
      2. In the Quick Find box, type Process Builder.
      3. Select Process Builder, then click New.
      4. Name the Process and click the Tab button. The API Name will populate. 
      5. As a best practice, always input a description. 
      6. The process starts when A record changes.
      7. Click Save.

      Step 3: Define Evaluation Criteria

      1. Click on the Add Object node to begin selecting the evaluation criteria.
      2. Select the Lead object from the dropdown list.
      3. Start the process when a record is created or edited.
      4. Click Save.

      Step 4: Define Process Criteria

      1. Click the Add Criteria node to begin defining the process criteria.
      2. Name the criteria.
      3. The criteria should execute actions when the No Criteria – just execute the actions!. 
      4. Click Save.

      Step 5: Add Action – Update Records

      1. Below Immediate Actions, click Add Action.
      2. For Action Type, select Update Records. 
      3. Name the action.
      4. Select the option Select the Lead that started your process record type. 
      5. The criteria for updating records should be No criteria  – just update the records! 
      6. Set new field values for the records you update: 
        1. Row 1:
          1. Field: Description
          2. Type: Formula
          3. Value: [Lead].FirstName &
            SUBSTITUTE($Label.NewLine, “-“,””)&
            [Lead].LastName
      7. Click Save.

      Almost there! Once everything looks good, click the Activate button. 

      Don’t forget to active the Process by clicking on the Activate button.

      Proof of concept

      Now onwards, if a business user updates the Lead, Process Builder will automatically populate the description with First Name and Last Name field.

      Formative Assessment:

      I want to hear from you!  

      What is one thing you learned from this post? How do you envision applying this new knowledge in the real world? 

      Let me know by Tweeting me at @automationchamp, or find me on LinkedIn.

      Have feedback, suggestions for posts, or need more information about Salesforce online training offered by me? Say hello, and leave a message!

      Posted in Process Builder, Salesforce Flow | 62 Comments | Tagged Activate a Process, Add a line break in Process Builder formula, Add action Process Builder, Add Criteria Proces builder, add new line in process builder formula, Add new line in process formula, Adding a line break in Process Builder formula, ADM 201, adm 201 certification, adm 201 salesforce, Automation Champion, BR_ENCODED_, BR_ENCODED_ Process Formula, Con 201, Custom Label, dev 401, flow, Lightning Process builder, Platform App Builder, Platform App Builder Exam, Process Builder, Process Builder examples, Process Builder formula, Process Builder rakesh, Process Builder Sales Cloud, Process Builder Salesforce, Process Builder Service Cloud, Process builder use case, Process Criteria, Process management, Record Updates action, salesforce, salesforce Admin exam, salesforce certified developer exam, Salesforce Online Training, Salesforce Platform Developer I, Salesforce Platform Developer I Exam, Salesforce Training, Visual workflow, Visual Workflow Implementation Guide, when a record is created or edited
    • Search

    • Upcoming Trainings

      Salesforce Administrator Certification
      Salesforce Advanced Administrator Certification
      Salesforce Platform App Builder Certification
      Lightning Flow & Process Builder
      Advanced Lightning Flow
      Pardot Specialist & Consultant Certification
      Sales Cloud Consultant Certification
      Service Cloud Consultant Certification
      Community Cloud Consultant Certification
    • Sponsor #1

    • Sponsor #2

    • Sponsor #3

    • Sponsor #4

    • Order Now!

    • Buy My Book

    • Buy My Book

    • Recent Posts

      • Getting Started with Process Builder – Part 60 (Allow Anyone to Add or Remove User into Public Group or Queue)
      • Getting Started with Salesforce Flow – Part 59 (Clone a Chatter Group with Members)
      • New Research: Salesforce Delivery Teams Excel in Speed but at the Expense of Quality
      • Improve Your Data Collection Strategy with Web Forms
      • Getting Started with Salesforce Flow – Part 58 (Customize Previous, Next, Finish, and Pause Button Label for Screen Flow!)
    • Salesforce ID Converter Build on Lightning Flow

      Converting 15 digit ID to 18 digit Salesforce ID
    • Blog Archives

    • Categories

  • Information

    • About Me
    • Affiliate Disclaimer
    • Contact Me
    • Privacy Policy
  • Top Posts

    • Learning Flow
    • Learning Process Builder
    • Salesforce Spring’21 Release Quick Summary
    • Getting Started with Salesforce Flow – Part 57 (Adding Validation to Flow Screen Components)
    • Getting Started with Salesforce Flow – Part 1 (Understand, Create & Use Variables in Flow!)
    • Getting Started with Salesforce Flow – Part 25 (Email Notification on Password Expiration)
    • Getting Started with Salesforce Flow – Part 11 (Count Number of records in a Record Collection Variable)
    • Getting Started with Salesforce Flow – Part 48 (Add a Topic to Multiple Records)
    • Getting Started with Salesforce Flow Builder– Part 21 (Validation Rule using a before-save Flow? Yes!)
    • Getting Started with Salesforce Flow – Part 31 (Auto Submit Record into Approval Process with Flow)
  • Social Media

    • View Automationchampion’s profile on Facebook
    • View Automationchamp’s profile on Twitter
    • View Rakeshistom’s profile on GitHub