Flow Components come with the ability to unlock a record through a Flow Action. There are two inputs to the Unlock Record Action. The first is the Unlock Record Id, or the Id of the record that you would like to unlock. The second is System Unlock which is a Boolean of True or False, defaulted to False.
The Unlock Record Flow Action runs in user mode without any additional setup. This means that a User who does not have the ability to unlock the record will not be able to. There is the ability for an admin to configure Flow Components to run in System Mode.
Even if the System Unlock Input Value is set to true, it will not necessarily run in System Mode. This is to ensure that a User has explicit permission to be able to use the Unlock Record in System Mode.
The Flow Component package comes with a Custom Permission, Enable Unlock Record In System Mode. This Custom Permission is required in addition to the Unlock Record Action to be set to True. The Custom Permission can be added to a Profile, a Permission Set, or the Permission Set that comes with Flow Components can be assigned to the User, which is also named Enable Unlock Record In System Mode. These two things together are required for the Flow to run in System Mode.
Creating multiple Quick Actions for each Record Type means getting a lot of buttons on a page layout. Trying to create this in Flow can streamline the number of buttons down to 1. You can’t show all record types, however, as if a User selects a record type they don’t have access to, things break.
The Get Available Record Types Apex Action will allow you to check a User’s permissions with Record Types on a given object. Simply enter select the Get Available Record Types Apex action.
Then select the object that you want to retrieve the Record Types for.
And set the output of those records to a Record Variable that allows for multiple values with the Object type of Record Type.
You can also get the Default Record Type Id in a Text Variable.
Simply choose them in the output of the Apex Action.
And you can easily assign the default Record Type in your Flow!
NOTE: As of right now, this Apex Action has the main function of getting the Default Record Type. There is a Lightning Component that has been built that will allow you to display the Record Type List to the User, however there is a current Salesforce bug that is preventing this from being able to be added to the Flow Components package. https://success.salesforce.com/issues_view?id=a1p3A000000BMPtQAO Once this is resolved, we will update the package with the Record Type Picklist Lightning Component that will allow you to easily have users select the Record Type of the record they would like to create with the results of the Get Available Record Types Apex Action.
Being able to lock and unlock records is very helpful for ensuring data integrity. In Salesforce Classic, there used to be a lock icon to let you know when a record was locked.
This hasn’t made it over to Lightning as of yet. As a result, you can use the Locked Record Notifier to let Users know that the record is locked and in addition, you can use your own note.
Simply go to Lightning App Builder, select the Locked Record Notifier, drag it to where you would like it to show, and enter some text. If the record is unlocked during the Lightning App Builder Page edit, you’ll see it blank, like below, as the Locked Record Notifier will not show unless a record is locked.
If the record is locked during the Lightning App Builder Page edit, you’ll be able to see the preview.
The component will automatically show if the record is locked and will not show if the record is unlocked. This is a great way to let your users know a record is locked, and give them additional information if needed!
Salesforce Approvals are a great feature that allow you to be able to track approvals and lock records from having any changes after approvals. Sometimes, however, an Approval Process doesn’t fit into the situation that you’re trying to create. You know how to create a custom approval process to achieve the process part of it, but since you’re not using the standard Salesforce Approval Process, you can’t lock the record.
With the Lock Record Apex Action, you can now lock that record.
Use the Lock Record Apex Action with Process Builder to automatically lock a record based on something like, the status going to Approved.
Additionally, you can use Flow and the Apex Actions in Flow to lock a record.
A simple Flow will allow you to lock a record, or add your custom logic to lock the record only after it has gone through a custom approval.
NOTE: Unlike the Unlock Record Apex Action, any user who has edit rights on a record will be able to lock the record. This means that you can lock a record from a Flow button without having to use Process Builder.
We’ve updated our component, check out the updated instructions here!
One of the great things about Approval Processes is the ability to lock a record so that a user cannot modify that record. One of the hard things to work around is when a locked record needs to be opened up to be edited again, for instance if, during electronic signature, the customer rejects the signature since they want to negotiate.
Enter the Unlock Record Apex Action, available with Process Builder or Flow! It is as simple as adding in your logic, say the a Quote status is updated to Rejected, then unlock the Quote.
Additionally, you can use this in Flow too. Simply select your Apex Action and add the record Id you’d like to unlock.
And voila, your Quote is unlocked! You can leave it as simple as below, or you can add in logic, like ensuring the Opportunity is not Closed Won, or other things like that!
NOTE: If running Unlock Record Apex Action in Flow, it does respect User permissions. So if a User does not have the permission to Edit a Locked Record, then they will not be able to unlock the record by simply clicking a button that launches to a Flow. Use Process Builder as Process Builder runs in system mode. If the logic is too complex for Process Builder, have Process Builder call the Flow to handle the more complex logic and then it can unlock the record. When Flow is called from Process Builder, it runs in system mode as well.
We’ve updated our component, check out the updated instructions here!
Using Flow is one of the most powerful tools for an admin. The ability to create your own complex workflow allows you to effectively implement your business processes without code.
There are three ways Salesforce has allowed you to launch a Flow from a page as an admin. You can create a button with a URL button, something like “/flow/myFlow”, you can use a Quick Action and run the Flow inside of that, or you can add it to your page layout with the Flow lightning component. These are great ways to be able to run Flows, but there are a few short comings.
First, if you use a Quick Action or a Button, you can’t dynamically show or hide the Quick Action or the Button, you’re stuck using Page Layouts. Second, if you’re using the Flow lightning component, when it loads on the page, it will always run. An example below shows a New Contact Flow that always runs on the page.
This is why we built the Run Flow Button lightning component. Salesforce allows developers to run Flows in lightning components and now we’ve brought this power to the admins.
To use the Run Flow Button lightning component, simply open Lightning App Builder, drag the Run Flow Button lightning component onto your page, enter text for your button, add the Flow API Name, and now you have a button that your users can press when they want to run the Flow.
Since it is a lightning component, you can also dynamically show or hide the button based on the lightning component filter criteria.
With your Run Flow Button configured and your filters set, you’re ready to give your users an enhanced experience with Salesforce lightning!
Lightning Component – Redirect Flow – Use inside a Lightning Flow to dynamically redirect the Flow to any URL you set or allow Users to click on a Button to redirect them. This includes redirecting Users to a record that was created inside the Flow, or adding URL variables, such as with a Conga Composer button, based on User selections inside the Flow.
Lightning Component – Run Flow Button – Use on a Lightning Page to create a button that when clicked, will run a Lightning Flow. Instead of the Flow running automatically when the page is rendered like the standard Flow Component, this will only render the Flow when a User clicks the button. Can be combined with Component Filters to only show the button in certain situations.
Apex Action – Unlock Record – Use inside Process Builder or Lightning Flow to unlock a record. Helpful for unlocking a record after an outside action has happened, such as a Quote being declined in an e-signature process, allowing a User to then edit the Quote again and resend for signature from the client.
Apex Action – Lock Record – Use inside Process Builder or Lightning Flow to lock a record, no standard approval process required. Helpful for building custom approval workflows with record locking at the end when the standard approval workflows are not robust enough.
Lightning Component – Locked Record Notifier – Use on a Lightning Page to notify the User if a Record is locked. Enter in your custom message to the User if the Record is locked in the Lightning App Builder. Lightning Component will not display if Record is unlocked.
Apex Action – Get Available Record Types – Use inside Lightning Flow to get the available Record Types for a User, based on the Object. Default Record Type Id for that User is sent back in addition to the List of Record Types allowed for the User. Use with Record Type Picklist Lightning Component to display Record Type selection to the User in a Lightning Flow.
Coming Soon – Lightning Component – Record Type Picklist – Use this Lightning Component inside a Lightning Flow Screen to display Record Types to the User for selection. Use in conjunction with the Get Available Record Types Apex Action to show a User the Record Types they are allowed to create.
We’ve updated our component, check out the updated instructions here!
Salesforce Lightning Flow is a powerful tool for Admins to be able to automate business processes and ensure users are following processes. I’ve written a lot about Salesforce Flows at developingflow.com and believe that admins can extend their point and click capabilities by learning Salesforce Lightning Flow.
There is another way to be able to redirect a Flow dynamically based on variables in the Flow. Instead of wrapping a Flow in a Lightning Component, you can instead add the Lightning Component as part of the Flow, either through a Flow Screen or through a Flow Action. There are two use cases here. One is to automatically redirect the user, to not only a record, but to any URL with customized parameters, and the other is to allow the User to click a button to decide where they would like to be redirected to.
Here’s a look at how the buttons look:
So how does this work? Well, using a single Lightning Component, we can either automatically redirect via a Core Action in the new Flow Builder or we can add the Lightning Component to a Screen.
In the above example, you are setting the “Redirect URL”, an input variable to the Lightning Component, with the URL that you would like. In this instance, I created a simple formula field (image below) to set the Contract that was created in the Flow as the finish location.
Additionally, you can add the Lightning Component to the Flow Screen and set the Button Label and the Redirect URL. In the instance below, I am setting the Contract as the Redirect URL for the first Lightning Component and the Account as the Redirect URL for the second Lightning Component. The screenshot below is the admin setup of the screen above with two buttons on it asking to “Navigate to Contract” or “Back To Account”.
I’m sure you’re thinking to yourself, but we still need to create the Lightning Component! Well, you’re half correct. Correct that you need a Lightning Component, incorrect that you need to create it. I’ve created a package for you to be able to download this component. This Lightning Component takes in any URL that you send it through the Flow, so this can be reused again and again with multiple Flows.
As Admins, sometimes we hit our point and click limits. Before Salesforce released Lightning, this usually meant (although not always) that Development would need to be done and Admins would lose some, if not most, control. With Salesforce Lightning, Development should extend an Admin’s control, through input and output variables. A Lightning Component could have been written to send a user to a single URL, which would then require a new Lightning Component for each URL. Instead, by rethinking the way that Admins and Developers interact, the same Lightning Component can be reused again and again by an Admin, in the way that the business needs, allowing an Admin to extend their control with the custom Development work and gaining more power as an Admin.
This has to be one of my favorite things that is coming out and it is a critical update. What does it do? I think an example helps. Let’s say that you sell things with a partner channel and have a lookup field on an Opportunity to lookup an Account to set the Partner on the Opportunity. When an Opportunity is Closed Won, if the Partner type is Gold, then you want to do one thing, and if the Partner type is Silver, do something else. Everything works fine UNLESS there is no Partner listed on the Opportunity. If there is no Partner listed on the Opportunity, then the Process Builder will give you an unhandled exception error. This is because it is trying to lookup a field on an Account that doesn’t exist. With this critical update, instead of creating an error, it will process everything as if it were null, so it would do neither the Silver or the Gold action, however it will not fail. This allows Process Builders to be built with less information. Previously, in order to not allow this to fail, you would have had to first check if the Partner field was null and then check the value, in that specific order. If you didn’t check for null first and the lookup field was null, that is when you would get the error. So this will help to reduce the amount of configuration needed for a Process Builder and will reduce the number of errors that a Process Builder might throw.
This sounds really interesting for Omni-Channel orgs. You can now use the fields of incoming records to assign work to agents. This should allow more flexibility in routing cases to agents and more customization based on the unique needs of each case.
Currently, all sandbox emails change from their email to an @example email. An example of this is firstname.lastname@example.org turns into email@example.com. Moving forward, emails in sandboxes will change to add .invalid to the main email, so using the same example, the new format is is firstname.lastname@example.org. Although this is a small change, users unfamiliar with the old pattern could get confused easily, so this should help make sandbox emails more straightforward.
Lightning Experience has many benefits for users regarding the user experience. One of the highly requested features was, when clicking on an object tab, to be able to select the list view that you would like to see. With Spring 19, this is now possible! Previously, every time someone clicked on an object tab, like Opportunities, it would default to recently viewed. Now each user can “pin” the list view that they would like to have defaulted, helping to improve the user experience and reduce the number of clicks it takes to get to where the user is trying to navigate to.
This is a highly requested feature on the idea exchange. The Accept work button was available in classic, but not lightning, at least not until Spring 19!
Navigation Updated for Small Screens
I can’t find this in the release notes, so I hope it is actually going to be updated when production gets updated, but in the pre-release orgs and sandboxes the navigation for “smaller” sized screens now shows the full menu instead of getting cut off. Notice on the screens shots below, the navigation bar adjusts correctly for the screen size, but the items in the same row as the search bar do not.
Now you can relate an email to a Contact, Lead, or Person Account that is not part of the email. This is helpful when someone has multiple emails and you have a single Contact record for them, you can still relate their email to their Contact record. In addition, if someone replies but forgets to reply all, you can still relate the email to people who might have been left off the email.
This one makes SOQL queries very nice for Lightning Development. With SOQL, you used to be able to see if a user could see a record based on with sharing. While this was nice, if you’re creating a table using fields in a field set, a user might not have access to certain fields in a field set. So after getting the records the user could see, a developer would also have to ensure the user could see each field. Using the new WITH SECURITY_ENFORCED as part of a SOQL query, developers can save time knowing if a user is allowed to see a field or not, and change what they display if a user is not allowed to see a field.
If you’ve been around Salesforce over the last few months, you most likely have heard about Lightning. Salesforce released their new platform, Lightning, in the Winter 16 release. Although it has been around for almost 3 years now, some companies are still unsure about making the move to Lightning. At Englhard Consulting, we are big fans of Lightning and believe companies that have not moved to Lightning are missing out. Why is that? Well, the new User Interface (UI) that Lightning brings gives admins so much more power over page layouts. Lightning brings a new feature, Lightning Pages, which mixes page layouts with the ability to add different components, like different cases for your phone. Phone cases might be slim and minimalist, some might have a “pocket” for IDs and credit cards, others have a kick-stand to hold the phone upright, while still others might be very big and bulky to prevent against damage from drops and liquid. Lightning pages allow admins the same sort of customization for their Users, where the standard page layout is no longer just the details and related lists. This gives each company the ability to customize their UI to the needs of their Users, whether it be minimalist or pocketed, and as a result, help with your Customer’s experience with your company. Let’s explore Lightning Pages and our top 5 out-of-the-box features that will give your Salesforce implementation a makeover.