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: Creating process builder component

    • Getting Started with Process Builder – Part 71 (Set Your Productivity on Steroids by Creating Reusable Processes!)

      Posted at 10:00 AM by Rakesh Gupta, on July 13, 2017

      Process Builder is one of the most used declarative tools to automate business processes in Salesforce. Most of us usually create a new process for each requirement. That not only is not a best practice but, for the long run, it is highly unproductive and unsustainable approach to managing process development. Furthermore, you run the risk of hitting governor limit if you create multiple processes on one object. Therefore, my suggestion is to create a maximum of two processes on each object (First will fire only when a record gets created, second will execute when the record gets updated) and use Visual Workflow to manage your complex logic. 

      After Winter’17 release it is possible to invoke a process (invocable processes) from another process. With invocable processes, you can reuse sections of your processes. Build one invocable process, call it from multiple processes or from multiple action groups in the same process. By using this method – of reusing a process – you can save time, keep governor’s limit at arm’s length and, boost your productivity! 

      You can invoke processes with objects that share at least one unique ID. For example, in the Account and Opportunity objects, the AccountId field is unique to Account and also used by Opportunity. You can create an invocable process that updates an Account record. Then you can invoke it from: 

      • A process that updates an Account record
      • A process that updates an Opportunity record 

      When you create a process, select, It is invoked by another process, option to make sure the process starts when another process invokes it. 

      Business Use Case

      Pamela Kline is working as a System Administrator at Universal Containers. She has received a requirement to update Account custom field, Out of Business, to True if an Opportunity Stage is updated to Closed Lost. 

      There are various ways, as listed, in which you can solve the preceding business requirement:

      • With one Process Builder on opportunity object 
      • Process Builder with Visual Workflow
      • Visual Workflow with Inline Visualforce Page
      • Apex Trigger

      As of now, the very first solution looks good. After few weeks, however, Pamela received another similar requirement – to update the Account custom field, Out of Business, to True if Account Rating is Not Interested. Oh, no! Not again!

      Now she has to re-write the same logic by creating a Process on Account object; this is tedious and time-consuming, to say the least. Because, as you can see, in both the requirements, we are updating Account custom field, Out of Business, to True. How about reusing the existing logic with Account Process? Let us do it!

      Solution for the above business requirement

      To solve the preceding business requirement (Update Account custom field, Out of Business, to True if an Opportunity is updated to Closed Lost), we will use the concept of invocable process. We have to create two processes for this, as follows:

      • The first process (It is invoked by another process) is placed on the Account object to update custom field, Out of Business, to True
      • Another process (A record changes) is placed on the Opportunity object, and it will fire only when an Opportunity Stage is updated to Closed Lost. 

      The benefit of using this approach is that if you get a requirement in the future – to update the Account custom field, Out of Business, to True if Account Rating is Not Interested – then, you call this process from your Account process without adding another Record Update on Account process.

      Read the rest of this entry!

      Posted in Process Builder | 4 Comments | Tagged Activate a Process, Add action Process Builder, Add Criteria Proces builder, ADM 201, adm 201 certification, adm 201 salesforce, Automation Champion, Break process builder process, Creating process builder component, Creating reusable Reusable Processes in Salesforce, dev 401, Lightning Process builder, Platform App Builder, Platform App Builder Exam, Process Builder, Process Builder examples, Process Builder rakesh, Process Builder Salesforce, Process builder use case, Process Criteria, Process management, Reusable Process builder process, Reusable Processes, Reusable Processes use case Salesforce, salesforce, salesforce Admin exam, salesforce certified developer exam, Salesforce Online Training, Salesforce Platform Developer I, Salesforce Platform Developer I Exam, Salesforce Training, 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 Salesforce Flow – Part 58 (Customize Previous, Next, Finish, and Pause Button Label for Screen Flow!)
      • Streamline Data Collection with Salesforce-Connected Forms
      • Getting Started with Salesforce Flow – Part 56 (Merge Chatter Topics with the Help of Salesforce Flow)
      • Getting Started with Salesforce Flow – Part 57 (Adding Validation to Flow Screen Components)
      • Getting Started with Salesforce Flow – Part 55 (Add or Remove Followers to a Record with the Help of Salesforce 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
    • Getting Started with Salesforce Flow – Part 42 (Running a Flow in System Mode)
    • Salesforce Spring’21 Release Quick Summary
    • Learning Process Builder
    • Getting Started with Salesforce Flow – Part 58 (Customize Previous, Next, Finish, and Pause Button Label for Screen Flow!)
    • Getting Started with Salesforce Flow – Part 24 (Automatically Assign Permission Sets to New User)
    • Add Record to Multiple Chatter Groups - Parsing Multi-Select Picklist fields (Flow)
    • Getting Started with Salesforce Flow – Part 11 (Count Number of records in a Record Collection Variable)
    • Getting Started with Salesforce Flow – Part 57 (Adding Validation to Flow Screen Components)
    • Getting Started with Salesforce Flow – Part 33 (Prior Value of a Record in Record-Triggered Flows)
  • Social Media

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