Posts

Showing posts from 2021

LinkedIn

Salesforce Flow Orchestrator - Implementation Details & Use Case Demonstration

Image
Flow Orchestrator is considered as the future of Salesforce Automation. In this blog let us see the basics of flow orchestrator and a detailed Implementation example. 1. What is Flow Orchestrator It helps to automate/orchestrate complex business operations, which involves multiple steps, multiple users from multiple departments. You can also sequence these operations. The core building block of flow orchestrator is flow itself. Assigned users access their part of the orchestration through a single Lightning page component. 2. When this can be used Below are some use cases where you will be able to use Flow Orchestrator: Advanced Approval Process New employee onboarding process where you need interaction/approval from multiple departments Interactive update to a record where we need input from multiple people 3. How to Create Flow Orchestrator From set up, Flow->New Flow->Select All+Templates->Flow Orchestrator 4. Types of Flow Orchestrator Like you can see in the above diagram

SOQL Injection - Demo and Approaches to Prevent it

Image
 In this post let us see a sample use case of SOQL Injection and the different methods to get rid of SOQL injection. 1. What is SOQL Injection? This will happen when we try to execute Dynamic Query in Apex, accepting input from the User. And the user can modify input value based on his need, thus resulting in unintended query results. 2. Sample Use Case We have got an LWC Component to Search for Accounts, accepting Account Name as the input parameter. On successful search, the component will display resulting accounts matching search criteria. Code Details below: accountNameSearch.html < template > < h1 > Search Account </ h1 > < lightning-card title = "Search Account Using Name" > < lightning-input label = "Enter Account Name" onchange = {handleFilter} class = "slds-size--2-of-8" ></ lightning-input > < br /> < lightning-button label = "SEARCH" onclick = {handleSearch

Salesforce Screen Flow - Roll Back Behavior

Image
 Similar to Apex Roll Back, as part of Winter 22, Salesforce has introduced Flow Roll Back feature also. Let us see the transaction behavior when using roll Back along with Screen Flow. 1. Feature Details As of now Roll Back feature is available only for Screen Flows.  All pending operations in the current transaction will be rolled back on adding Roll Back element to a fault connector. This is useful when we have a series of DML operations happening in a single transaction and ScreenFlow will try to combine all those into a single transaction 2. Use Case - Single Input Screen - Multiple DML  I would like to develop a screen where you can create both Account and Contact together on a single screen. The flow looks like below: The input screen looks like below: And once you enter details in all fields and click on next, Below operations will be happening: Below is the Transaction Behavior 3. Add failure to Contact Save Now let us add a validation rule on Contact to make the email field m