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