• Joshua Morrison 6
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies

We created a process that updates the expiration date field of an insurance policy via process builder. It works great except for polcies with an effective date in June. It is adding an extra year to the expiration date. 
So if a six month policy effective date is 06/01/2016 it is saying the expiration date is 12/01/2017 instead of 12/01/2016. 

Seems like it works perfect for all other dates and months except for June. The formula is below. If anyone could take a look at it I would grealty apprciate it.  I am sure it is just a minor error.   Thanks! 

DATE(
year([Policy__c].Effective_Date__c)
+ floor((month([Policy__c].Effective_Date__c) + 6)/12) + if(and(month([Policy__c].Effective_Date__c)=12,6>=12),-1,0)
,
if( mod( month([Policy__c].Effective_Date__c) + 6, 12 ) = 0, 12 , mod( month([Policy__c].Effective_Date__c) + 6, 12 ))
,
min(
day([Policy__c].Effective_Date__c),
case(
max( mod( month([Policy__c].Effective_Date__c) + 6, 12 ) , 1),
9,30,
4,30,
6,30,
11,30,
2,if(mod((year([Policy__c].Effective_Date__c)
+ floor((month([Policy__c].Effective_Date__c) + 6)/12) + if(and(month([Policy__c].Effective_Date__c)=12,6>=12),-1,0)),4)=0,29,28),
31
)
)
)
I am gettting frustrated trying to find a company to do this for us. It seems like all the salesforce developing companies are geared to larger companies. We are a small business and just need some minor salesforce customizations. Can someone help???? Thank you.

We created a process that updates the expiration date field of an insurance policy via process builder. It works great except for polcies with an effective date in June. It is adding an extra year to the expiration date. 
So if a six month policy effective date is 06/01/2016 it is saying the expiration date is 12/01/2017 instead of 12/01/2016. 

Seems like it works perfect for all other dates and months except for June. The formula is below. If anyone could take a look at it I would grealty apprciate it.  I am sure it is just a minor error.   Thanks! 

DATE(
year([Policy__c].Effective_Date__c)
+ floor((month([Policy__c].Effective_Date__c) + 6)/12) + if(and(month([Policy__c].Effective_Date__c)=12,6>=12),-1,0)
,
if( mod( month([Policy__c].Effective_Date__c) + 6, 12 ) = 0, 12 , mod( month([Policy__c].Effective_Date__c) + 6, 12 ))
,
min(
day([Policy__c].Effective_Date__c),
case(
max( mod( month([Policy__c].Effective_Date__c) + 6, 12 ) , 1),
9,30,
4,30,
6,30,
11,30,
2,if(mod((year([Policy__c].Effective_Date__c)
+ floor((month([Policy__c].Effective_Date__c) + 6)/12) + if(and(month([Policy__c].Effective_Date__c)=12,6>=12),-1,0)),4)=0,29,28),
31
)
)
)