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: Custom clone using Lightning Flow

    • Getting Started with Salesforce Flow – Part 53 (Clone a User with their associated Public Group, Queue Membership and Permission Sets)

      Posted at 7:33 PM by Rakesh Gupta, on January 18, 2021

      Big Idea or Enduring Question:

      Want to quickly create a new user by cloning an existing user with Public Group, Queue, and Permission Set? 

      To Clone a record means to replicate it. Salesforce provides an out-of-the-box feature to clone object records – thereby, saving time and enhancing productivity. Generally, if someone wants to clone an Account with an Opportunity they would opt for an Apex Trigger But, we know better! Oh, Ya!

      Salesforce provides ‘Clone with Related‘ action. The action makes it simple to create recurring Opportunities and Campaigns.  By using the action, your Account reps will spare themselves from the trouble of finding and adding related items one–by–one to re-create the records. Unfortunately, Salesforce doesn’t have ‘Clone with Related‘ action for the User object Therefore, in this article, I will show you how to configure a deep clone feature in your org.

      In the past, I have written a few articles on automating User creation pre and post-process. Why not check them out while you are at it?! 

      1. Getting Started with Salesforce Flow – Part 24 (Automatically Assign Permission Sets to New User)
      2. Getting Started with Process Builder – Part 19 (Automatically Add New User to Public Group or Queue)
      3. Getting Started with Process Builder – Part 28 (Auto Freeze Users Account)
      4. Getting Started with Process Builder – Part 43 (Auto Assign package license to New user)
      5. Getting Started with Salesforce Flow – Part 36 (Automatically Add New Users to a Chatter Group)
      6. Getting Started with Salesforce Flow – Part 50 (Welcome New Users by Default – Auto Follow them in Chatter!)
      7. Getting Started with Process Builder – Part 22 (Discover How to Auto Populate Delegated Approver Field on a New User Record!)

      Objectives:

      After reading this article, you will be able to:

      • Use Flow to deep clone User with Public Group, Queue membership, and associated Permission Sets
      • Understand the difference between a Permission Set that is owned by a User (User created) and a permission set that is owned by a Profile (System generated)
      • Learn how to use a Decision element to find whether a Record variable or a Record collection variable, contains a record
      • Find out how to use the Loop element to create multiple records (or clone records)
      • And, last but not least, discover how to use the Create Records element to create multiple records at once (Bulk Safe)

      Business Use Case

      Steven Greene, a Lead System Administrator at Universal Containers (UC), received a requirement to create an automation that would allow System Administrators to quickly create users by cloning an existing user. In addition, the solution should also allow the Administrators to clone public group and queue memberships including associated permission sets.

      To get started we will copy the following fields from an existing User‘s Record:

      1. TimeZone
      2. Language
      3. Locale
      4. Profile
      5. Role
      6. UserLicense
      7. Email Encoding
      8. Manager

      Allow System Administrators to populate the following fields:

      1. First Name
      2. Last Name
      3. Email
      4. Username
      5. Alias
      6. Nickname

      Steven envisioned the new Flow screen similar to the following screenshot: 

      Automation Champion Approach (I-do):

      While this can be solved using various automation tools like Apex, etc, we will use Screen Flow.

      Before proceeding, you have to understand the PermissionSet objects in Salesforce. It represents an association between a User and a PermissionSet. There are two types of Permission Sets:

      1. Permission Set that is Owned by User (User created).
      2. Permission Set that is owned by Profile (System Generated) – Every profile is associated with a permission set that stores the profile’s user, object, and field permissions, as well as setup entity access settings. Permission sets that are owned by profiles can be queried but not modified. 

      By default, every user will be assigned to a Permission Set that is owned by the Profile, and this Permission Set will not be visible in the User Interface. If you query the Read the rest of this entry!

      Posted in Salesforce Flow, Screen Flow | 37 Comments | Tagged Clone record using Lightning Flow, Clone record using Salesforce Flow, Clone records using Lightning Flow, Clone with related records, clone without code, Custom clone using Flow, Custom clone using Lightning Flow, custome clone in salesforce, Deep clone, flow, Flow best practices, Flow examples, Record Create, Record Lookup
    • 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
    • Learning Process Builder
    • Getting Started with Salesforce Flow – Part 11 (Count Number of records in a Record Collection Variable)
    • 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 4 (Need to Redirect a User to a New Record?)
    • Getting Started with Salesforce Flow – Part 1 (Understand, Create & Use Variables in Flow!)
    • Getting Started with Salesforce Flow – Part 31 (Auto Submit Record into Approval Process with Flow)
    • Getting Started with Salesforce Flow – Part 33 (Prior Value of a Record in Record-Triggered Flows)
    • Getting Started with Process Builder - Part 1 (Automatically Create a record)
  • Social Media

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