In Salesforce, retrieving records is often achieved through the Get Records element within a flow. In some cases, more advanced logic is needed, such as retrieving records that match specific criteria or running actions only on certain scheduled days.
This Salesforce Flow solution retrieves Account records created in the current month and only takes action on a designated day, such as the 7th of the month, keeping data both current and aligned with a defined schedule.
This article explains how to build a Scheduled-Triggered Flow in Salesforce that automatically finds Account records created in the current month and pushes their start date forward by 12 months. It walks through creating a custom field, building the flow logic, and testing the result.
Sometimes the standard Get Records element in a flow is not enough. You may need to retrieve records that match specific criteria and only run actions on certain scheduled days, such as the 7th of every month. This solution retrieves Account records with a start date in the current month and year, then extends each one by 12 months, keeping renewal or planning dates accurate without manual updates.
`DAY(TODAY()) = 7`
This formula returns true only on the 7th day of the month, which is what the next Decision element checks.
Add a Loop element to iterate through the collection of Account records retrieved in the previous step.
`MONTH({!Loop_through_Account_Records.Start_Date__c}) = MONTH(TODAY()) && YEAR({!Loop_through_Account_Records.Start_Date__c}) = YEAR(TODAY())`
This formula compares the month and year of each Account's Start Date to the current month and year, so only records started this month move forward.
Set the Decision element to take the Yes path if the formula from Step 7 returns True.
In the Yes path of the Decision element, add an Assignment element that adds each matching Account record to the collection variable created in Step 9.
Add a Loop element to iterate through the collection variable that stores Accounts from the same month and year.
`ADDMONTHS({!Loop_Through_List_of_Accounts.Start_Date__c},12)`
This formula takes the current Start Date and returns a new date exactly 12 months later.
Add another Assignment element that adds the updated Account record variable to the collection variable created in Step 15.
Save and activate the flow.
_________________________________________________________________
Written by: Maham Hassan | Forum Ambassador
Maham Hassan is 2x Mom, Salesforce MVP, Director & Technical Architect @ Cloud-1 & Check Automate, Founder of Dubai Dreamin, 16x Certified, Trailblazer Mentor, Community Group Leader & All Star Ranger.
Submissions reflect only the opinions of the user who made available the Submission and not the opinions of Salesforce, regardless of whether the user is affiliated with Salesforce, and may contain or constitute products, services, information, data, content and other materials made available by or on behalf of third parties ("Third Party Materials). Salesforce neither controls nor endorses, nor is Salesforce responsible for, any Third Party Materials, including their accuracy, validity, timeliness, completeness, reliability, integrity, quality, legality, usefulness or safety, or any applicable intellectual property rights. Any Submissions made available through any message board or forum in response to posted questions, or that otherwise purports to answer any questions, including any questions about Salesforce or Programs, are made available for your general knowledge only and should never be relied upon as answers to your specific questions (even if an answer is marked as a "best" answer or with any similar qualifications). You should always contact Salesforce support for answers to your specific questions. Salesforce has no control over Submissions, and is not responsible for any use or misuse (including any distribution) by any third party of Submissions.
If you have questions, tap into the wisdom of our entire Trailblazer Community here: https://trailhead.salesforce.com/trailblazer-community/feed
001979869

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.