You need to sign in to do that
Don't have an account?
Rick SF Admin
Apex Trigger to update a Date field when a specific picklist value is selected
The link below is my original post that was answered. However, when I enter the complete advance formula for my Date formula field I get "Error: Compiled formula is too big to execute (8,069 characters). Maximum size is 5,000 characters". I have over 70+ picklist values with long names that have to be displayed completely and each value has a corresponding date. Abbreviating is not an option. I spoke with a SF dev support analyst and was told that a possible solution maybe to create an Apex Trigger.
Ex. PIcklist Values: Test, Demo, Draft
If Test; then date value = 12/1/2018
If Demo, then date value = 11/1/2018
If Draft then, date value = 10/1/2018
This is the code I used for testing purposes for the Date formula field.
https://developer.salesforce.com/forums/ForumsMain?id=9060G000000Xj73QAC#!/feedtype=SINGLE_QUESTION_SEARCH_RESULT&id=9060G000000MVBiQAO
Ex. PIcklist Values: Test, Demo, Draft
If Test; then date value = 12/1/2018
If Demo, then date value = 11/1/2018
If Draft then, date value = 10/1/2018
This is the code I used for testing purposes for the Date formula field.
CASE(TEXT( Project1__c ), 'Test1', DATE(2018,12,02),'Test2', DATE(2018,11,02), null)
https://developer.salesforce.com/forums/ForumsMain?id=9060G000000Xj73QAC#!/feedtype=SINGLE_QUESTION_SEARCH_RESULT&id=9060G000000MVBiQAO
All Answers
Can you show me an example of what that would look like? And thanks for the repsonse!