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
Danica Alexis LlantosDanica Alexis Llantos 

Hi, I need a help with formula field that will add Installment Date (Date Field) to the number of Terms (number field)

For ex: Installement Date is 4/01/2023 and number of terms is 30 days the formula should print out 5/1/2023. If number of terms is 0 it should print out the next installment date.
SwethaSwetha (Salesforce Developers) 
HI Danica,
Try below to get started
IF(NumberOfTerms__c = 0, Installment_Date__c,
    DATE(YEAR(Installment_Date__c), MONTH(Installment_Date__c), DAY(Installment_Date__c) + NumberOfTerms__c)
)
Note that this formula assumes that the NumberOfTerms__c field contains a number of days. You must modify the formula if the value of this field is a number of months or years.

If this information helps, please mark the answer as best. Thank you
Danica Alexis LlantosDanica Alexis Llantos
Hi Swetha, 

Thank you for you response, I'm getting an error:  Error: Field fw1__Installment_Date__c does not exist. Check spelling. I'm adding the formula field under Invoice Object which has the terms field, however the Installment Date field is under Installment Object which is related to Invoice Object. One Invoice can have multiple Installment and if the terms is 0 from invoice it should reflect the next installment date. 
Danica Alexis LlantosDanica Alexis Llantos
User-added image
Danica Alexis LlantosDanica Alexis Llantos
Master-Detail(Invoice)