Skip to main content

Flow Updates in Winter'23

In this post, I'll discuss my favorite five flow features in the Winter 23 release. 

1. Use the IN and NOT IN operators to find related records. 

When you have the Ids in the collection variable, it is now easy to access the associated entries. Assume you have a collection of record Ids in the collection variable and wish to get the relevant records. There are currently two alternatives. 
 1. Use the loop element to go one by one and obtain the records inside the loop element. 
 2. Implement the get record logic in an apex class and call it from the flow.


Option 1 is not scalable since it keeps the get record element inside the loop and hits the governor restrictions when the loop element exceeds 100, and option 2 requires us to write code when we can accomplish it with clicks in Winter 23 release. 


With the Winter'23 release, we can now obtain the records by using the IN and NOT in operators. The operator is supported by the flow elements Get record, Update record, and Delete record. 



 

2. Lookup flow screen element now supports Multi select 


In the Winter 23 release, the salesforce lookup element in flow allows multiple record selection by default, therefore there is no need to construct a custom LWC component and embed it within your flow to match the need. The lookup flow element will get a new option to indicate the maximum number of chosen records for the element and to save the ids of the selected records in a collection variable.




 3. Use Record-Triggered Flows to update related records 


We now have one more option to update the related record in the update records element. We now have an additional option in the update records element to pick Update records linked to the objectName record that initiated the flow; the option also allows us to filter the record and perform the update.



 4. LWC ❤️ Flow 

A screen flow may now be included into Lightning Web Components. The lightning-flow tag allows us to directly embed the Flow in the lightning web components, as well as provide the input variable and perform specified actions in the LWC after the flow completes. 

<lightning-flow flow-api-name={flowname} flow-input-variables={inputVariables} onstatuschange={handleStatusChange}></lighting-flow>


  5. Flow Testing - Generally available 


Salesforce introduced this feature in summer’22 release as a beta feature and with Winter’23 release flow testing is Generally available. Now we can create, save and run tests in the flow builder. Flow tests now supports scheduled paths and also packaging starting from winter 23 release and able to create flow from a debug run

Comments

Popular posts from this blog

Avoid Duplicate Records Using Flow

In this blog post lets see how to avoid duplicate records in Salesforce using the powerful feature – Flow , As the word says, flow easily flows to fulfill the requirements with ease. ☺  Many think of appexchange solutions and source code to avoid the duplicate record in salesforce, But the method I'm going to explain here is completely different and very simple. It helps you to reduce your code and can easily rebuild for other objects with different field logic with simple clicks. Lets jump into the solution, we will use flow to check duplicate record logic and use apex trigger to initiate the Flow whenever a record is created or updated. Visual Work Flow : [Click] First we will create the Flow to check the duplicate records based on the name and store the result in the variable. In this example, we will use the Account object for the dupe check. Step 1  : Create a new visual flow with the Name ‘ DuplicateAccountCheck ' Step 2  : Click and drag the RecordLookup into t

Export records from List view – ListView API

As part of the Winter’15 release salesforce introduced the List View API features which helps us to get details and records of list views for an object. I was started exploring more about the List view API and trying to build an use case using that. So I searched about List View in the IdeaExchange site then found that many users are looking for a solution to export records to excel directly from the list view. I built a solution for that Idea, which helps user to download all the records directly from the List view for both standard and custom object. You don’t have to make any change in the code to use this functionality for different objects. All you need is to create a custom button for that object as mentioned below. Lets take an example for Account object 1. Go to Setup –> Accounts –> Buttons, Links and Actions 2. Click ‘New Button or Link' 3. Enter  Label, Name and select display type as ‘List Button’ 4. Content source as “Onclick Javascript” and paste the

Become an Apex Integration Specialist in 2 hours

In the series of my favourite trailhead module blogpost this time, I’m going to cover about one of the most expected and important developer focused trailhead module “ Apex Integration Service ”. This time salesforce launched with new a Trail and 6 badges which brings over all 13 trails and 70 shiny badges in the Trailhead. Most of the salesforce projects will have an integration with the other application in the project life cycle. As a salesforce developer, we must have a sound knowledge in Integrations and salesforce provides this free “ Apex Integration service ” trailhead module which has 4 units with the followings topics Apex Integration Overview   This overview module makes you understand the difference between the Webservice and HTTP callouts and use of external site in Webservice topic salesforce Apex REST callouts  This module covers the both consuming and sending data through REST callouts. You will learn about the Deserialize  and  serialize   JSON strings in ap