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
inanskarinanskar 

Formula for auto incrementing of month for a Date

Hii All,

i am looking up for a formula  for auto incrementing of month for a Date 

i tried for one Opportunity closeDate to be automatically incremented in its related Invoices Invoice Date field

i tried for a formula  but it's just incrementing once can u guys help me through out for the right formula

 

DATE( 
year( Opportunity__r.CloseDate ) 
+ floor((month( Opportunity__r.CloseDate ) +Add_Months__c)/12) + if(and(month( Opportunity__r.CloseDate )=12,Add_Months__c>=12),-1,0) 

if( mod( month( Opportunity__r.CloseDate ) + Add_Months__c , 12 ) = 0, 12 , mod( month( Opportunity__r.CloseDate ) + Add_Months__c , 12 )) 

min( 
day( Opportunity__r.CloseDate ), 
case( 
max( mod( month( Opportunity__r.CloseDate ) + Add_Months__c , 12 ) , 1), 
9,30, 
4,30, 
6,30, 
11,30, 
2,28, 
31 


)

 

Thanks in Advance..