function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Robby ButteryRobby Buttery 

Need help with a custom formula field

Hey all,

Posted about this a while ago, but still never got a real answer. Please help if you can!

We have a Date field in our Contact records - "Date of Training"

We want to build a Checkbox field in the Account level that looks at all of the Contacts related to that Account, and if there is a Contact trained in the past 6 months, then the box will be checked. If there is no Contact in the Account trained in the past 6 months, the Checkbox will be unchecked.

Can anyone help with this?
Sumit Kumar Singh 9Sumit Kumar Singh 9

Hi Robby, 
You can't do this with formula field as far a I know. You need to execute onee time script to update the previous records and trigger to handle future records.

Sumit Kumar Singh 9Sumit Kumar Singh 9
How many total accounts on your Org?
Robby ButteryRobby Buttery
We have about 20k Accounts. And maybe Formula field was the wrong verbiage. It was more about having a Checkbox field that would dynamically fill depending on whether or not there are trained contacts from the past 6 months. I'm positive that it would take some APEX work, just don't know how to approach it