1

I'm trying to use Process Builder to populate a client status one year ago today. We have a date field that I can base this on of, let's say, "Last Purchase Date". If this date field is between 12-18 months ago, I want to populate the status field with a given value.

I've tried using the conditions below, but it doesn't work. Any thoughts on what is wrong with this logic? I've been unable to get a good solution from Salesforce support.

enter image description here

2
  • PB only triggers when a record is created or modified. You'll need to take a different approach in order to make this work, perhaps a formula or something.
    – sfdcfox
    Commented Mar 7, 2019 at 21:43
  • We have a sync process from external systems that "modifies" our records at least daily. I'm also testing the logic by modifying and saving records, and it's failing.
    – clippert
    Commented Mar 7, 2019 at 22:03

1 Answer 1

3

Your logic is inverted; it should be "less than" for the first entry, "greater than" for the second. To see why, consider this:

365 days ago was March 7th, 2018, so the first entry matches March 8th, 2018, but not March 6th, 2018. 545 days ago is September 17th, 2017. This means the second criteria will match September 16th, 2017, but not September 18th, 2017.

In computer logic, March 4th is less than March 5th, and March 5th is greater than March 4th. This is different than what we typically mean when speak about times in the past (e.g. in normal English, when we say "less than 5 days ago", it implies "after March 2nd").

Your combined logic looks like this to Salesforce:

  <--------------|        |------------>
     Less than 545        Greater than 365

At no point do they overlap. You'll need to invert the logic.

     |-----------------><---------------|
     Greater than 545       Less than 365

You must log in to answer this question.

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