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
Maria FranklinMaria Franklin 

Flow - Update a checkbox field IF date value on another field is older than 729 days

Hi All! 

I'm having a tough time getting my Flow to work. 

Goal: 
I need to ensure that a checkbox field, Sync_to_Marketo__c, is left BLANK if the record's field, Most_Recent_Submission_Activity__c, date value is older than 729 days from today.

IF the checkbox field, Sync_to_Marketo__c, on a Contact record is currently flagged but the Most_Recent_Submission_Activity__c field shows a date that's older than 729 days from TODAY, then the Flow should unflag the Sync_to_Marketo_ field. 

Currently, I have it set up like this...It is not working. 

Record-Triggered Flow
Object: Contact
Trigger: A record is created or updated
Optimize for: Actions and Related Records
 

Custom Condition Logic Is Met
Condition Logic: (1 OR 2 OR 3 OR 5) AND 4

1. (Field) Deactivation_Date__c  (Operator) IsNULL (Value) {!$GlobalConstant.False}

2. (Field) Email  (Operator) IsNULL (Value) {!$GlobalConstant.True}

3. (Field) Email  (Operator) Equals (Value) missingemailaddress@noemail.com

4.  (Field) RecordTypeId  (Operator) Equals (Value) DoNotUse

5. (Field) HasOptedOutOfEmail  (Operator) Equals (Value) {!$GlobalConstant.True}

When to Run: 
Every time a record is updated and meets the condition requirements

Optimize Flow For: Actions and Related Records
------
UPDATE RECORDS
How to Find Records to Update and Set Their Values: 
Use the Contact record that triggered the flow

Filter Conditions: Custom Condition Logic is Met
1. (Field) Most_Recent_Submission_Activity__c  (Operator) GreaterThan (Value/Resource) {!DontSynctoMarketo}


[The formula for the Resource 'DontSynctoMarketo' is: TODAY() - 729 ]

Set Field Values for the Contact Record
(Field) Sync_To_Marketo__c (Value) FALSE

Thank you in advance!