How can you automatically send password expiration reminders to users?
This blog post will help us to understand the following
Use Schedule-Triggered Flow to automatically send a reminder email to users
Use Schedule-Triggered Flow to run a job that executes every morning at 8:00 am
Business Use case
Pamela Kline is working as a System administrator at Universal Containers (UC). She has received a requirement from the management to send out a reminder email(Morning at 08:00 am) to users to change their passwords 7 days before they expire.
Automation Champion Approach (I-do):
Changing Salesforce passwords periodically is crucial, as it prevents hackers from gaining access to your org, even if they have stolen user credentials. Configuring password expiration to a set number of days, say 90, is a common practice among IT admins.
In Salesforce a system administrator can set the password, for example – User passwords expirein days we define(like 30, 60, 90, etc). The main problem with this approach is that the user doesn’t get any reminder email before or after their password expiration date.
When it comes to notifying users that their passwords are going to expire soon, more communication is always better. Users do not enjoy the password change process; keeping them informed as to when their password will expire is a great way to improve their experience.
There are a few possible solutions for the above business scenario. We will use Schedule-Triggered Flow to solve the requirement. Before we unwrap, let us understand what Scheduled-Triggered Flowis. Scheduled Flows are not triggered by an Event on the data; they simply run when a scheduled time arrives.Scheduled Flows run as follows:
Once (On a particular date and time)
Daily (On a particular date and time)
Weekly (On a particular date and time)
Remember, when a Flow starts, a Flow interview runs for each record that matches the filter criteria – no looping is required. The matching record is stored in the $Record global variable, so you can reference the variable, or its fields, throughout your flow.
Before discussing the solution, let me show you a diagram of a Process Flow at a high level. Please spend a few minutes to go through the following Flow diagram and understand it.
A Lead is the identification of a person or entity that has the interest to purchase a product or service from your organization. People who Managing Lead in Salesforce, they face one major problem i.e. LeadDe-duplication. Salesforce does not have any out-of-box app that will check based on some parameter for the duplicate lead while creating new Lead in the system. You can achieve this functionality by using Visualforce page and Apex, but it’s requiring knowledge of both. In this article, I will focus on how to achieve this functionality by using Visual workflow.
Business Use Case
Higher management in Universal Container wants to build functionality for LeadDe-duplication where they want to enter Company Name on the first screen and if any company exists with same name display all, the user will select one and redirect them to selected lead’s detail page. In case if the lead does not exist with Same Company Name it redirects them to New Lead page with auto populate Company Name that user entered as search criteria.
Next work is to create a decision, If multiple records exist with Same Company Name we will redirect the user to a screen from where he/she can choose existing record. If no record exists with same Company Name we will redirect the user to New lead creation page. Drag and drop decision element in canvas and create two outcomes Yes and No as shown in below screen shot
Now we will create screen and it will display multiple lead records. Drag & drop screen into Canvas and give name Dynamic choice display, Add dynamic Choice field and select
Create a choice for object: – Lead
Field: – Company equal to Company_Name (Variable)
Choice label: – Name (Lead Name)
Save ID of the record in variable ThirdID
You can take help from below screenshot
Dynamic Choice display
In the next Screen, we will display selected record (with a link from where a user can open selected record). To do that Drag & drop screen into Canvas and give the Name DisplayThirdID , add one output field and create a URL same as below screenshot
Now we will create two Screens. First Screen displays no record found with entered Company Name message and then we will redirect the user to next Screen where he/she found a link to create new Lead. To do that first Drag & drop Screen into Canvas and just display a message (No record exist with name Company_Name ).Again drag & drop screen into Canvas and give the name toOpenNnewLeadPage, add one output field and display field and display link
Save this Flow and create one VisualForce Page and reference your flow
Overwrite your New Button available on the Lead object. To do that follow the path Name | Setup | App Setup | Customize | Leads | Buttons, Links, and Actions | New Overwrite it with a VisualForce page that you created in the last step.
Now it’s time to test this feature
First, we will try to enter Campany name that already exists in the system. To Create New lead, navigate to Lead tab and click on New Button, it will open Visualforce page and enter Company Name ( In our case enter Salesforce.com) for which you want to create lead and click on Next, as shown in below screenshot
Step -1 Enter Company name
If Lead with same Company Name exist in system, it will return the whole list and click on Next, as shown in below screenshot
Step -2 Select One record
You will redirect to a new Screen where link will appear and click on it, to go to selected record detail page
Step -3 Click on Link to open record
2. Now we will create a lead with Company name that does not exist in System.
Again create new record by navigating Lead tab and click on New Button, Enter Company Name as Universal Container and click on Next, as shown in below screenshot
Step -1 Enter New Company Name
It will redirect you to screen where message will display like below screenshot and click on Next
Step -2 Display no record exist message
Now a screen will appear with link, click on the link to create NewLead
Step -3 Click on Link to Create New Record
Note: – You can add more fields on screen first as per your requirement to find lead records.