Category: Lightning Experience

Dynamic Action in Salesforce

 In this post, I will share the details about Dynamic Action. This is the continuation of my earlier post where I have explained Dynamic Form. These two features complement each other so well that we can implement quite a broad range of scenarios in Lightning Experience with the help of these two i.e. Dynamic Form and Dynamic Action.If you haven’t go through my earlier post about Dynamic Form, please click here.This post will cover -What is Dynamic Action?How to activate Dynamic Action?What can you do with Dynamic Action?Things to know before implementing Dynamic Action.As always, if you prefer watching videos, please click here. Otherwise, the same video is posted at the end of this post.What is Dynamic Action?Dynamic action will help you to configure which actions will appear to your user under which scenarios. So like classic, your end-user will only see the actions that are relevant as per the record stages/scenarios.Do not worry, I will explain this with some use cases here in this post. This feature came into existence during Summer ’20 release.How to activate Dynamic Action?Activation is Dynamic Action is very simple. Basically, when you will edit the lightning record page in Lightning App Builder, you will find an option to “Upgrade Now” on the right side when you click on the Highlight Panel. This is shown in the screenshot below -Clicking on “Upgrade Now” will...

Read More

Dynamic Form in Salesforce

In this post, I will share the details about Dynamic Form, a feature that was introduced in the Summer ’20 release. Dynamic Form was one of the top voted idea that was delivered. If you ever worked in Classic and Page layout, you know how flexible the page layout is. Admins can add fields, sections, buttons etc. with few clicks and then assign multiple page layouts to the different combinations of Profile and Record Type. Dynamic Form is bringing the same level of flexibility to the Lightning Experience. Excited? This post will cover below -What is Dynamic Form?How to activate Dynamic Form?How to add/delete/arrange fields to Dynamic Form?How to change the UI behavior of the fields added in Dynamic Form?How to change the field visibility in Dynamic Form?Things to know before implementing Dynamic Form.If you prefer watching videos, please click here, otherwise, the same video is posted at the end of this post.Note – Dynamic Form is incomplete without Dynamic Action. They complement each other very well. In this post, I will be focusing mainly on Dynamic Form and then I will publish the second part, where I will be focusing mainly on Dynamic Action.Great!. So without any further detail, let’s dive in.What is Dynamic Form?Dynamic Form was first introduced in the Summer ’20 release and then it became GA(Generally Available) in the Winter ’21 release. With the help of...

Read More

Display Flow Stages with Progress Indicator in Flow Screen

Do you know that now you can show your flow’s progress by writing a simple aura component that will track flow stages and display the progress? In this post, I am going to show you how you can quickly configure this in your flow. Create the Aura ComponentThe good news is that Salesforce already provides the code which you can reuse and create your own Aura component. You can get the code here.Creating the FlowYou need to create a screen flow. Configuration steps are given below -Create StagesFor the flow we will be creating, let’s assume we have three stages as -Stage: About Me with Order: 10Stage: Upload Photo with Order: 20Stage: Update Address with Order: 30Below is the screenshot of the “About Me” stage. You can create other stages the same way, just remember the order as this will define how the stages will be displayed on your flow screen.Create the First ScreenNow you can create the first screen and add the lightning aura component which you have already created as mentioned in the first step. The aura component which I developed is “DisplayProgress”.API Name – You can put any nameCurrent Stage – {!$Flow.CurrentStage}Stages – {!$Flow.ActiveStages}Manually assign variables (advanced) – This should be checkedNote – Do not put anything under “Store Output Values to Select Variables”Create the AssignmentNow when your user will click next on the first screen, you will move...

Read More

How to update “N” records in Flow

 If you are implementing business logic through Salesforce’s flow, you might need to loop through a list of records to do some manipulation. This is a very basic requirement. If you ever need to query records from Salesforce (let’s say all accounts where the billing country is India), it is very easy to do in SOQL and Get Records flow elements. But things will become a little tricky when the requirement says “Fetch first 5 accounts based on the created date where the billing country in India”. It is definitely very easy in SOQL with the limit statement, but in Get Records flow element, there is no way to (as of Winter’21 release) limit the record.To overcome this situation, we can implement the counter mechanism which will basically make sure that when the # of loop iteration is greater than 5 (because we just need the first 5 accounts), the flow will not perform any business logic.Here is the overall flow -Here as you can see for each loop iteration, we are incrementing the counter value by 1 and then checking whether the new value is greater than 5 or not. Based on that decision element, either we are updating the account’s rating i.e. performing business logic or ignoring the business logic execution. This flow solution is definitely making sure that only for the first 5 records the business logic...

Read More

How to restrict @AuraEnabled method access for Authenticated users

As we all know security is always the number 1 priority for Salesforce, so there is a critical update coming to all of our Salesforce environments. This will change the way we provide access to AuraEnabled Apex methods. From this post, you can expect -What problem this update is going to solve?When can we expect this update in our environments?Show me the problemShow me the solution(s)Show me all the places where I need to make this changeWhat problem this update is going to solve?When we write our Lightning Component or Lightning Web Component today, for any type of server operation, we write Apex classes and annotate the method with @AuraEnabled. We don’t have an option today to restrict the access to our AuraEnabled methods today. That is why Salesforce came up with this important critical update where you need to specify who can access your AuraEnabled methods. I will explain this update with one example later in this post.When can we expect this update in our environments?This update “Restrict @AuraEnabled Apex methods to authenticated users” came as part of Salesforce’s Winter ’20 release. Enforcement will start on August 9th, 2020.Show me the problemLet’s say we have this below Lightning Web Component where we pass a string to the AuraEnable controller class and then class return list of Contacts. Finally component is going to display the list of contacts. Below is the...

Read More
Loading

Earlier Posts

  • 2024 (31)
  • 2023 (47)
  • 2022 (25)
  • 2021 (35)
  • 2020 (41)
  • 2019 (13)
  • 2018 (16)
  • 2017 (14)
  • 2016 (18)
  • 2015 (74)
  • 2014 (20)