Posted at 10:25 AM by Rakesh Gupta, on December 11, 2020
Big Idea or Enduring Question:
How do you allow your users to preschedule Chatter posts?
Chatter is a great way to boost collaboration in your organization. You can Post Status, Links, Files, and Comments on others’ posts, etc. Many time I found on Trailblazer community people is asking about a way to Preschedule Chatter Posts. But Salesforce doesn’t have any out-of-the-box feature for this, so the next way is to use the AppExchangeapp.
In this article, I will show, how you can develop your own app for scheduling Chatter Posts too without code.
Objectives:
After reading this blog post, the reader will be able to:
Use After-save Record-Triggered Flow to create a record
Use After-save Record-Triggered Flow to delete a record(s)
Add a Scheduled Paths action in After-save Record-Triggered Flow
Monitor Time-based flow queue
Business Use case
Pamela Kline is working as a System administrator at Universal Containers (UC). She has received a requirement from the management to allow their users to preschedule Chatter posts. Which will help them to schedule posts ahead of time, for example, birthday wishes, or other important announcements.
Automation Champion Approach (I-do):
Salesforce now (After Spring’21 Release) allows you to add time-dependent actions in the Flows, similar to the Process Builder.This is a major enhancement that will ultimately bring Flow to the next level.
There are few solutions possible for the above business scenario, but we’ll use After-save Record-Triggered Flowto solve it.Check out this articleto understand why we are using after-save record-triggered flow for this scenario.
Before proceeding ahead, you have to understand the FeedItemobject. It represents an entry in the feed, such as changes in a record feed, including text posts, link posts, and content posts.
Field Name
Details
Body
This is the message that appears in the feed.
ParentId
The ID of the object type to which the is related. For example, set this field to a UserId to post to someone’s profile feed, or a GroupId to post to a specific Group.
Type
The type of feed item. In our case it’s Textpost.
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.
Let’s begin building this automation process.
Guided Practice (We-do):
There are 2 steps to solve Pamela’s business requirement using After-save Record-Triggered Flow. We must:Read the rest of this entry!
Posted at 7:13 PM by Rakesh Gupta, on April 28, 2014
In day today life Sales people switch their job frequently, so to manage their existing or closed deal or lead we have to transfer it to the new owner. Salesforce provides various ways to change Ownership of records from one user to another. But Salesforce doesn’t provide a way to transfer records Ownership using Salesforce1 app. In this article I will show you the way by using it you can develop your own tool for transfer Ownership and it will also work on Salesforce1 app.
Business Use Case
Higher management at Universal Containers wants to develop an application for Salesforce1, from where they can completely transfer record ownership from one user to another user in the mass.
Solution for the above business requirement
Again this is power of Visual Workflow, we will create an app without using a single line of code. Salesforce provides various another tool that you can use for this purpose like Data Loader etc. Our app will completely transfer all records from old user to new user, you can add conditions as per your business requirements. To develop add functionality follow the below instructions
Note: – In this article I will discuss only about mass transfer of records. In similar fashion you can develop an application for transfer single record. I will also provide Unmanaged package of my app so you can play it within your dev org.
1. Click on Name | Setup | App Setup | Create | Workflows & Approvals | Flows
2. Click on New Flow, it will open flow canvas for you
3. Drag and drop a Screen ( Give the name Mass Transfer Record) on the window, add three fields with below details
Name
Data Type
Value
Required
Object Name
Dropdown List
Account
Contact
Opportunity
Yes
Old Owner
Textbox
Yes
New Owner
Textbox
Yes
It will look like below screenshot
To Get User Input Screen – 1
4. On the next Screen we will show the list of old users based on user input on the old user field on Screen-1. Now add one Dropdown List field ( Give the name Old User Name) create a new Dynamic Choice with below details
Select Object User
Enter criteria IsActive= {!$GlobalConstant.True} and Name = {!Old_Owner} (Screen1 Old Owner input field)
Save ID in some variable in my case it’s {!OldOwnerID}, same like below screenshot
To get list of user for Old user name
Repeat same process for New user input field and get all users. Now add one Dropdown List field ( Give the name New User Name) create a new Dynamic Choice with below details
Select Object User
Enter criteria IsActive= {!$GlobalConstant.True} and Name = {!New_Owner} (Screen1 Old Owner input field)
Save ID in some variable in my case it’s {!NewOwnerID}.
Finally, Screen-2 will look like below screenshot
To confirm User name Screen – 2
5. On the next Screen-3, we will confirm the all details from the user. Do to that Drag and drop a Screen ( Give the name Confirmation) on the window, add one field Display type and add text as shown in the below screenshot
To Confirm all details Screen – 3
6. Now it’s time to decide which object record user want to transfer. Based on User input for “Object Name” field on Screen-1 we will select the object and transfer the records. To do that add one Decision element and it will auto redirect to respective Record update element as shown in below screenshot
Decision Element to select Record Update element for respective object
7. The final step is to transfer records for those objects from old user to new user. To do that Drag and drop a Record Update element onto the window, and map the fields as per below screenshot
Transfer account records from old to new user
Repeat same Record Update process for contact and Opportunity object. Finally, our flow will look like below screenshot
Use this app on Salesforce1
To use this app on Salesforce1 , create a Visualforce Page, Select Available for Salesforce mobile apps check box and embed your Flow and crate a Visualforce Tabs to call it. Bel0w is the sample code for your reference
<apex:page >
<br/>
<Center><Font size ="6" color ="orange">Mass Transfer Records</font></Center>
<br/><br/>
flow:interview name="Mass_Transfer_Records"/>
</apex:page>
Now navigate to Name | Setup | Administration Setup | Mobile Administration | Mobile Navigation
Add you Visualforce Tabsinto selected pane, as shown in below screenshot
Add Visualforce Tab into Mobile Navigation
It’s time to test this feature
To test this app open your Salesforce1 and navigate to Apps and click on your Tab (Mass Transfer Records)it will open a Visualforce page for you. In this demo I will transfer all account records where the owner is old user (Rakesh Gupta) to the new user(EMEA Sales) and click on Next In our case Screen-1 will look like below screenshot
Screen -1
On the Screen-2 it will show the list of user based on user input on Screen-1. Select the old user and new user from the Drop-down list and click on Next, It will look like below screenshot
Screen – 2
On the Screen-3 it will show all the details in same screen and ask for your confirmation, if you are happy click on Next, and it will transfer all record from old user to new user. It will look like below screenshot
Screen – 3
Install this app
I am offering this app an Unmanaged package, you can install it from below URL