1

This is truly one of the most bizarre Salesforce Phenomena's I have ever encountered in my life. I have a process builder with the following function. This formula 100% evaluates to true and was working for all users when the tasks had activity dates from 2019 and up. For some reason when the task had an activity date from 2018 and below, the process builder would not execute at all. But when I would change the activity date to 2019 and then back to its original date, the process builder would fire. To double check everything I created this exact formula on the task (minus the ischanged fields) and they were evaluating as True.

Is there a hidden bug in Salesforce around tasks not being updated if the activity date has a certain date?

Here is the formula - I tested this for ~5 hours and I know it works.

JUST AN FYI - the Process Builder literally wont fire for any tasks where the activity date is in 2018. This is the strangest thing. But as soon as I move it to a random date in 2019 and then back to its original date, all active process builders fire again. So its not even a matter of this formula, its literally all my active process builders.

AND(

OR
(
ISCHANGED([Task].OwnerId  ),
ISCHANGED(   [Task].ActivityDate ),
ISBLANK(   [Task].Ramping_Activity_Timeline__c   )
),


OR(

AND
(
 [Task].Owner:User.Start_Date__c   <= [Task].ActivityDate,

DATE( Year(ADDMONTHS(  [Task].Owner:User.Start_Date__c  , 1)), MONTH( ADDMONTHS(  [Task].Owner:User.Start_Date__c  , 1)) ,1 ) -1 >= [Task].ActivityDate

),


AND
(

DAY(  [Task].Owner:User.Start_Date__c  )>= 10,
DATE( YEAR(ADDMONTHS(  [Task].Owner:User.Start_Date__c  , 1)), MONTH(ADDMONTHS( [Task].Owner:User.Start_Date__c , 1) ) , 1 ) <= [Task].ActivityDate,

DATE( Year(ADDMONTHS(  [Task].Owner:User.Start_Date__c  , 2)), MONTH( ADDMONTHS(  [Task].Owner:User.Start_Date__c  , 2)),1 ) -1 >= [Task].ActivityDate
)

)




)
3
  • 1
    Does your Salesforce org have the default 12 month threshold for Activity archiving? I would wager that is what is happening here.
    – David Reed
    Mar 12, 2020 at 16:15
  • How can I see this? - help.salesforce.com/… looks like this might do the trick Mar 12, 2020 at 16:19
  • If you haven't requested an increase, it's the default.
    – David Reed
    Mar 12, 2020 at 16:24

1 Answer 1

2

Salesforce archives Activities after twelve months by default. Orgs may request an increase in this threshold.

Archived Activities still exist in the database and can be viewed in related lists, but they don't show up in reports or responses to normal SOQL queries.

I believe this phenomenon is a consequence of these archived Activities in your org not being returned to the queries performed internally by Process Builder to evaluate some aspect of your entry or action criteria.

I won't recommend a specific fix here because I'm not sure what the business process or use case is around editing Activities more than 12 months old. If you're actively using those older Activities, you may wish to request an increase in your archiving threshold.

3
  • Is there a place to see the archive rules for our org? I cannot seem to find this anywhere. Prior to me joining the company, they might have done this. I also can generate reports in our org with activities more than 12 months old. Mar 12, 2020 at 16:31
  • I don't think that it's visible in your org. Perhaps it was set to 18 months? You may need to file a case to know for sure.
    – David Reed
    Mar 12, 2020 at 16:33
  • Wow - You are right. When I search Isdeleted = true, so many more tasks appear! This is 100% why this is happening Mar 12, 2020 at 16:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .