Many times I found that organization wants to display Notice/Information after user login into Salesforce, similar like Salesforce downtime or maintenance notification. Displaying information after login will help the organization to spread the words to several folks.
Business Use Case
Higher management in Universal Container wants to develop a feature when a user login into Salesforce they want to display important information to them.
Solution for the above business requirement
I think this is a good use case to start with Login Flow. After Winter’15 release Login flow is generally available. To solve this requirement we will use Visual Workflow and Login Flow user. To develop this application follow the below instructions
1) First of all, create a custom object (Notice_Board__c) and field (DisplayText__c) to Save Information/Notice details that your organization wants to display at the time of login
2) Click on Name | Setup | App Setup | Create | Workflows & Approvals | Flows
3) Click on New Flow, it will open flow canvas for you
4) Now create a variable with name GetInfoText and we will use into the flow
5) Drag and drop a Record Lookup ( Give the name Get display text) on the window
- Select Object Notice_Board__c
- Enter criteria DisplayText__c != {!$GlobalConstant.EmptyString}
- Save DisplayText__c into the variable {!GetInforText}, same like the below screenshot
6) The next task is to display the information, to do that Drag and drop a Screen ( Give the name Display Information) on the window
- Add one Display Text (InformationToDisplay) and pass the variable {!GetInforText}
- You can also add color and Images into it, do to that you can use HTML code
7) Finally, our Flow will look like the following screenshot
8) Save the flow with name Login Flow then Activate it and close the canvas.
Create a Login Flow
Our next task is to create Login Flow so that our flow will fire/invoke when user login into system. To create a Login Flow follow the below instructions
1) Click on Name | Setup | Administer | Security Controls | Login Flows
2) Click on the New button
3) Enter the Login Flow Name, Select the flow, User license and Profile, It will look like the below screenshot
4) Once done click on the Save button.
It’s time to test this feature
To test this application follow the below steps
1) Create one record in object (Notice_Board__c) to save the display information, you can take help from the following screen shot
2) Login into Salesforce with user who has profile (i.e. AS in my above example) that mentioned in login flow
3) After successful login you will redirect to below notice board screen
Note: – I will suggest you to Implement this first on your developer org test it and then move it to Production.