What was missing was a place to show you some of the great Applications and Utilities that you, the Administrator, can download and use to help you develop in and support your own orgs. Check out this new section often to see what might be there that you can put to use. Let us know in the comments about other Apps and Utilities that you would like to see highlighted on this page.
https://unofficialsf.com/wp-content/uploads/2022/09/largeUCSF-300x133.png00Eric Smithhttps://unofficialsf.com/wp-content/uploads/2022/09/largeUCSF-300x133.pngEric Smith2020-09-11 10:36:482020-09-11 10:36:53Check out the new addition to unofficialsf.com!
Many of the components on this site get updated on a regular basis with new enhancements. All you should need to do is follow the installation instructions to bring the component version up to date in your own orgs. Unfortunately, the methods and versions of the packaging tools we’ve used to produce these updated releases have changed over time. Things have finally settled down a bit and we are trying to be much more consistent in how the updates get packaged.
If you do run into issues there are a few things you can try. Unofficialsf.com contributor, Jack Pond, wrote this article a while back that may do the trick for you.
Another possible issue pops up when you have already created Flows that use the component you are trying to upgrade. Here’s an error you might see when trying to upgrade from v2.0 of the QuickChoice component:
This means you will have to Uninstall the current version before you can re-Install the new version. That’s OK if you haven’t already created Flows that use the component. What happens then is that you might get a message like this, “Unable to uninstall package” followed by one or more “Component is in use by another component in your organization. My_Flowname“.
If you are seeing this, you will need to first Delete any Flows that already use the component you are trying to update. Rather than having to recreate them from scratch, you can temporarily Export them then Import them back in after you have installed the updated component. Do this by first installing my Import/Export Flow Utility Flow.
The Import/Export Utility works with the most recent or active version of the Flow. You might also find that you have a number of older, inactive versions of the Flow that you have to delete as well. This can be a time-consuming manual process that can be avoided if you install my Flow and Process Builder List View with Batch Delete App.
It will be a fairly painless process once you have the right helper utilities installed in your org.
Export your affected Flows
Delete the inactive versions of the Flows
Uninstall the old Component
Install the new Component
Import your saved Flows
https://unofficialsf.com/wp-content/uploads/2022/09/largeUCSF-300x133.png00Eric Smithhttps://unofficialsf.com/wp-content/uploads/2022/09/largeUCSF-300x133.pngEric Smith2020-09-10 10:58:312020-09-10 11:02:44What to do when you have trouble updating a component
https://unofficialsf.com/wp-content/uploads/2022/09/largeUCSF-300x133.png00Alex Edelsteinhttps://unofficialsf.com/wp-content/uploads/2022/09/largeUCSF-300x133.pngAlex Edelstein2020-09-08 15:32:272020-09-08 15:32:31The Definitive Guide to Managing Access for Guest User Accounts
One thing I really like to see: Flow Components with price tags. That typically means customer support and solid, deep functionality. A recently available ‘pro’ component for your consideration: AddressTools from ProvenWorks. They already had a potent lightning component that checks the validity of addresses. They’ve now exposed that functionality via two new Flow Screen Components:
https://unofficialsf.com/wp-content/uploads/2022/09/largeUCSF-300x133.png00Alex Edelsteinhttps://unofficialsf.com/wp-content/uploads/2022/09/largeUCSF-300x133.pngAlex Edelstein2020-09-07 20:37:212020-09-07 20:37:26From ProvenWorks: A Replacement Address Component With All Sorts of Smart Verification
A really nice use case from Vibhor Goel: he pointed out that the common situation where a delete is prevented by related records can be addressed with a Before Delete flow like this one:
https://unofficialsf.com/wp-content/uploads/2022/09/largeUCSF-300x133.png00Alex Edelsteinhttps://unofficialsf.com/wp-content/uploads/2022/09/largeUCSF-300x133.pngAlex Edelstein2020-09-07 20:29:322020-09-07 20:29:34Winter ’21 Preview from AccidentalCoder: Use Before Delete Triggers To Clear Out Related Records So Your Delete Will Work
DetectAndLaunch has been updated to include an option to launch screen flows modally. It also has the ability to launch different flows depending on whether the record has been edited or deleted.
https://unofficialsf.com/wp-content/uploads/2022/09/largeUCSF-300x133.png00Alex Edelsteinhttps://unofficialsf.com/wp-content/uploads/2022/09/largeUCSF-300x133.pngAlex Edelstein2020-09-06 11:17:282020-09-06 11:17:41DetectAndLaunch v1.1 : Launch _Screen_ Flows Modally when Records are Edited or Deleted
This Post was most recently updated on: 3/21/23 Current Version: 2.0.2
3/21/23 โ Eric Smith โ Version 2.0.2 Uses the BasePack version of the Flow Picker instead of the stand-alone version
3/18/23 โ Eric Smith โ Version 2.0.1 Updated to use the current versions of the Flow Base Packs Intallation updated to use Unlocked Package links
Have you ever wanted to copy or move a Flow or Process Builder from one org to another without having to create a Change Set or rebuild it from scratch?
How about seeing a great Flow that you or someone else has created and would like to share?
Install this Flow in your org if you would like to Export or Import Flows and Process Builders.
Instructions
Export a Flow
Select Setup> Process Automation> Flows
Open Import/Export Flows
Run the Flow
Select Export, choose your Flow and click Next
You will see the export status while the Flow is being transferred
A success message will display once the Flow has been exported
The exported Flow is saved as a Salesforce File linked to your User record. To see your Files, click on the Waffle, type in Files and select Files.
To download and save your Flow file so it can be shared, select the drop-down arrow and choose Download.
Import a Flow
Select Setup> Process Automation> Flows
Select Import/Export Flows
Run the Flow
Select Import then click on Upload Files
Pick the Flow file from your computerโs file dialog box. Hint: The file names for Flows and Process Builders will end with .flow-meta.xml
After the file has been uploaded, select Done then click Next
You will see the status while the Flow is being imported and then deployed to the current org
A success message will display once the Flow has been imported and deployed
NOTE: Objects, fields and referenced components must be available and compatible in the new org in order for the Flow to be deployed successfully.
Installation
Step 1
This component requires that you first install or upgrade the Flow Base Packs
Because this component uses Metadata APIs, youโll need to have a Remote Site Setting in the org. If you donโt, youโll see an error like this the first time you try to Import or Export a Flow.
You will need to configure your org to essentially allow applications to run that call out to the internet and then back into the same org via its API endpoints.
The best way to get the correct endpoint is to force the error.
Select Setup> Process Automation> Flows
Open Import/Export Flows
Run the Flow
Select Export, choose your Flow and click Next
If you do not have the correct Remote Site Setting yet, the Flow will display the โUnauthorized endpointโ error. Copy the endpoint url listed in the error message as you will need it in the next few steps.
In Setup, type remote, select Remote Site Settings and click New Remote Site.
Give the Remote Site a name, paste in the url you copied from the error message and click Save.
9/3/20 – Eric Smith โ Version 1.1 Updated the Flow Base Components (v1.2.6) to resolve an issue where some Flows would generate an error on Import or Export
9/1/20 โ Eric Smith โ Version 1.0 Initial Release
https://unofficialsf.com/wp-content/uploads/2022/09/largeUCSF-300x133.png00Eric Smithhttps://unofficialsf.com/wp-content/uploads/2022/09/largeUCSF-300x133.pngEric Smith2020-09-02 07:02:332023-03-27 16:19:03Import and Export Flows between Salesforce Orgs
Ladies and gentlemen, I present to you what might be one of my favorite new actions: The Mass Transactor Action!
We at CapTech Consulting looked for the most impactful action for both our clients and the community, and decided it would be extremely powerful to enable Flow to run Creations, Updates, and Deletes of records asynchronously – AND specify a batch size.
Using this new invocable you will be able to transact records withlittle concern for limits – so long as you set your batch size correctly. Batch processing is specifically designed for large volumes of transactions – think of it as a ‘set it and forget it’ method of doing DML in Salesforce.
This action has been shown to create well over 10,000 records in a single Flow. That same flow, carrying out standard synchronous Create Record, failed at 300 records. That represents an increase of more than 33 times the transactional capacity of a typical DML action in Flow!
What’s ‘Asynchronous’?
tl;dr (too long, didnt read) version: Async processing increases your limits. Use it when you want to do stuff to a lot of stuff and you don’t care exactly when the stuff gets done.
Most of what you work with in Salesforce are synchronous transactions. That means that when you do something to trigger the transaction, you will need wait until the operation is done. Asynchronous transactions work the opposite way: you send it off into the dark and hope everything works out okay. You can still determine if it succeeded, but it will take a little more work by querying the AsyncApexJob object using the outputted JobId.
Pass this action a collection of records you want to create, update, or delete
Decide if you want to change the default Batch Size, which is 200. This means that Salesforce will bucket 200 records into a transaction. If you want to process 5,000 records and your batch size is 200, Salesforce will effectively create 25 separate transactions for you – all with doubled SOQL/CPU limits! For ‘busy’ objects with a ton of code or automation, you’ll want to lower this if you have issues at 200.
Run the flow
If you want to track the progress of your operation, make note of the returned JobID, and use it at the Apex Jobs page in Setup or do a Get/Lookup in flow using the provided Job ID on the AsyncApexJob object and show the returned Job record’s fields on a screen for the user.
Major Features of the Invocable
Create, Update, or Delete a record collection asynchronously from Flow and double your governor limits
Creates a Batch job that lets you monitor its progress from the Apex Jobs setup page or lets you query the AsyncApexJob object using the output’d JobID. You can then display the status on a flow screen using results from a ‘Get’ on the AsyncApexJob object using the JobID as your identifier:
Real World Walkthrough
Stay tuned for a walkthrough of how this could be used to process THOUSANDS of records.
Batch Management & Notes
Use in Triggers / Processes – Be very careful when using this in any process builder launched flows, triggers, or after-update flows. Batch jobs are not meant to be triggered hundreds of times.
Batch Size – If your input collection is 2,000 records and your batch size is 500, it will create 4 batches. Each batch is considered a transaction to Salesforce. If in doubt, leave the batch size input blank – it will default to 200.
Batch Size Management – Lower the batch size number if you have a lot of of code/automations and you need to ensure you dont hit Apex Limits. The only way of truly knowing the safe number is by testing – 200 is a great starting point. Keep in mind a lower number will mean the job will take longer complete, but will ensure you don’t hit limits.
For Creates – Getting the record Ids created by the job is not currently possible from within Flow without some extra work.
Empty / Null Checks – Ensure you’re doing a null/empty check on whatever collection you pass in before running the action! There’s no use creating empty jobs to clog up the Apex Jobs list.
Inputs
Operation Type (Text) Valid options are Create, Update, or Delete
Input Collection (Record Collection) Can be any sObject/Record collection from Flow
Note that if you want to Update or Delete records, an Id will need to be present in the collection. It doesn’t support specifying an External Id. Yet.
Batch Size (Optional) (Number) Specify how many records you want Salesforce to process at once.
Ranges from 1 – 2000. Default is 200.
THERE IS A MAX OF 2,000 RECORDS PER BATCH! This is a Salesforce imposed limit and this will throw an error if you try and go above it.
This is where the magic happens – lower this number if you have a ton of code/automations and you need to ensure you don’t hit Apex Limits.
Finish Notification Email Address (Optional) (Text) A single email address to send the finish email to
Body of the email (Optional) (Text) What the email will contain upon completion
Subject of the email (Optional) (Text) Subject of the email upon completion
Outputs
Success True or False (Boolean/Checkbox) Set to true if the batch was successfully submitted to the queue
Error Message (Text) If the job didn’t create successfully this will be populated
Download / Source
NOTE: Keep in mind this is an UNMANAGED package, which means it cannot be upgraded in the future. I would suggest installing in a sandbox and deploying the apex classes together when migrating to production.
We’d love to build in more details about the success of the Job – potentially tying this with a custom platform event that will output a string of IDs created or an event that a Flow can listen for and act on.
Provide for a success/failure email using either an email template ID or a flow text template
Building in Upsert functionality
Create a separate action that allows you to cancel a job if needed
Provide a SOQL query to do your Update/Delete – this is handy if your collection exceeds the SOQL limit of 50,000 records.
https://unofficialsf.com/wp-content/uploads/2022/09/largeUCSF-300x133.png00Adam Whitehttps://unofficialsf.com/wp-content/uploads/2022/09/largeUCSF-300x133.pngAdam White2020-08-31 17:27:112021-08-06 06:59:18Create, Delete, or Update Tens of Thousands of records at a time in Flow with the new Mass Transactor Action!
The DateMatcher action lets you achieve more precise scheduling of your Schedule-triggered Flows, enabling you to run Flows that activate on ‘the third Wednesday each month’ or the ‘the 23rd of August, each year’.
The action compares the current date/time to the configuration you’ve provided, and simply returns a true or false based on whether the current day is a match. So the way to use Date Matcher is to create a Schedule-Triggered flow that triggers every day, and then have it always run DateMatcher to see if the current day matches your criteria:
Suppose you have a screen flow that you want to automatically launch whenever you’re on a record page and the record changes. Most likely, this will be because the user just edited the record. As an example, suppose you want to make it so that every time a Case is edited and its priority changes, a screen flow runs that asks the user to provide some extra reasons if the priority has been raised to ‘High’.
This new DetectAndLaunch component makes this easier. It’s designed to sit invisibly on a page and listen for an event that gets fired by Salesforce when a record changes. Simply provide Detect and Launch with the name of the flow you’d like to run. It will load the flow into a subtab if the app is in console mode, and a separate browser tab or page if the app is not in console mode.
Launch Conditions
By default, the flow will launch on every change to the record. However, you can refine that and make the launch dependent on a particular field value change. Example: you need an agent to fill in specific details when they close a case or your sales reps need to send a quote to the customer you can launch a flow after a specific field has changed and, for example, is equal to true. See ‘Conditional Screen Flow Launch Based on a field edit’, below.
You can set the record to run a screen flow on an Edit, a Delete, or every time the record is loaded.
Demos
This demo was produced for V2.0 and shows Conditional Launch Based on a Field Edit:
Triggering a screen flow when a record page loads
Perform this with the new input field โFlow Name (when the record is loaded)โ. You can use this to launch the flow when the record is opened. Note that if you are using Launch Mode = Modal, you will need to build a close function within the flow, as the modal doesn’t have a close function, yet.
Conditional Screen Flow Launch Based on a new Field Value
Let’s say you have a case record that you want to launch a flow when the case is closed to get the user to enter the amount of time that they spent on the case. To configure this within Detect and Launch, enter the flow name you want in โFlow Name ( when the record is edited )โ, set Change Field to โStatusโ, and set Change Value to โClosedโ.
Want to check multiple fields and launch different flows based on them? Or run different flows depending on the value of the field? Add multiple Detect and Launches with different criteria to launch different flows.
Example Configuration
Limitations
This component uses the force:recordData component and that component doesn’t support all Salesforce standard objects. For example, the Event and Task objects are not supported. For a list of supported objects, see the User Interface API Developer Guide.
Inputs
Flow Name (when Record is edited)
editFlowName
The apiName of a flow you want to launch when the record is updated. Will work if this component is added to a record home page.
Flow Name (when Record is deleted)
deleteFlowName
The apiName of a flow you want to launch when the record is deleted. Will work if this component is added to a record home page.
Launch Mode
launchMode
Can be ‘Modal’ or ‘Modeless’. Modeless is the default. Modal only works on an edit and not on a delete.
Change Field (What Field To Watch For)
Change Field
Is used to signify what field you want to watch when a record has been edited. Used only with editFlowName
Change Value (What value are we looking for)
Change Value
Used to be the comparison value when the record has been edited.
Flow Name (When Record is Loaded)
Flow Name (when the record is Loaded)
Use this to launch the flow when the record is opened.
https://unofficialsf.com/wp-content/uploads/2022/09/largeUCSF-300x133.png00Alex Edelsteinhttps://unofficialsf.com/wp-content/uploads/2022/09/largeUCSF-300x133.pngAlex Edelstein2020-08-29 16:34:062023-02-08 19:08:16Launch Screen Flows Automatically When a Record Changes with ‘Detect and Launch’ Page Component