You need to sign in to do that
Don't have an account?
sfdc-admin-sm
Trying to populate a date field by a workflow field update
Hello,
I need some help.
I am trying to automatically populate a date fieId (Expiration_Date__c) by a workflow field update based on multiple values of the Term field (Term__c)
So for example,
If Term__c = 1 then the Expiration_Date__c = Start_Date__c + 1 month
If Term__c = 6 then the Expiration_Date__c = Start_Date__c + 6 months
If Term__c = 12 then the Expiration_Date__c = Start_Date__c + 12 months
If Term__c = 24 then the Expiration_Date__c = Start_Date__c + 24 months
Please help me create this formula for the workflow field update.
Thanks,
@sfdc-admin-sm,
@saravanan is right. You will need to use one of those functions. Looks like you need to learn to write SF formulas.
CASE( term__c,
1, Start_Date__c + (1 * 30),
6, Start_Date__c + (6 * 30),
12, Start_Date__c + (12 * 30),
Start_Date__c + (24 * 30))
Salesforce does not have a formula function to add months to a date. You can only add days. You can find a custom formula to add months in these boards, but that would definitely exceed your compile size of your formula.
Read formula manual pages here: http://login.salesforce.com/help/doc/en/customize_formulas.htm
Hope this helps,
Thanks,
All Answers
Hi
Please refer the CASE() function on the formula.
@saravanan - Yes I am aware I need a formula or Case function. The question is HOW do I write it? Please provide the exact formula to resolve the issue.
@sfdc-admin-sm,
@saravanan is right. You will need to use one of those functions. Looks like you need to learn to write SF formulas.
CASE( term__c,
1, Start_Date__c + (1 * 30),
6, Start_Date__c + (6 * 30),
12, Start_Date__c + (12 * 30),
Start_Date__c + (24 * 30))
Salesforce does not have a formula function to add months to a date. You can only add days. You can find a custom formula to add months in these boards, but that would definitely exceed your compile size of your formula.
Read formula manual pages here: http://login.salesforce.com/help/doc/en/customize_formulas.htm
Hope this helps,
Thanks,