You need to sign in to do that
Don't have an account?

How can I have a date field auto updated when the opportunities stage changed?
We have a customized field added to opportunity about contract signing date, we want the field is auto filled by the date when the stage of the opportunities changed to "Won- Agreement Signed". as the stage is a picklist field, I cannot use If, but I also failed when I use Case.
This is my formula, it doesn't work. SF said it cannot be used for picklist field.
CASE((StageName = "Won - AGREEMENT SIGNED & ACCEPTED"),TODAY())
can anyone help me to give a correct script?
thanks very much
Carol
This is my formula, it doesn't work. SF said it cannot be used for picklist field.
CASE((StageName = "Won - AGREEMENT SIGNED & ACCEPTED"),TODAY())
can anyone help me to give a correct script?
thanks very much
Carol
Use the following syntax of IF Formula : IF(logical_test, value_if_true, value_if_false)
IF(
ISPICKVAL(StageName , "Won-AGREEMENT SIGNED & ACCEPTED" ),
ContractSigningDate = TODAY(),
ContractSigningDate = NULL
)
Hope you find this useful.
Regards
Pankaj Shakya
Thank you very much! I type your syntax and it returns this error :" Formula result is data type (Boolean), incompatible with expected data type (Date)." could you please continue to help?
thanks!
Carol
Please try Workflow field update,
Set the Evaluation Criteria as "Evaluate the rule when a record is created, and any time it's edited to subsequently meet criteria"
Rule Criteria: StageName Equals "Won - AGREEMENT SIGNED & ACCEPTED"
Field update: ContractSigningDate = TODAY()
Please ensure if you have any Process builder using this stage field.
Thanks,
Jothi
Please define the type of the formula field as Date.
When creating the formula field on Opporutnity, choose the return type as Date.
Hope this helps you.
Regards
Pankaj Shakya
hope you give further guidance.
thanks very much
The syntax IF(logical_test, value_if_true, value_if_false) has 3 parameters:
1. logical_test
2. value_if_true
3. value_if_false
It can't have more than 3. Your error says you have entered 5 parameters.
IF(
ISPICKVAL(StageName , "Won-AGREEMENT SIGNED & ACCEPTED" ), // locical_test
ContractSigningDate = TODAY(), // value_if_true
ContractSigningDate = NULL // value_if_false
)
You can modify the false conditon accordingly. I have mention Null just as a reference.
Hope this helps you.
Regards
Pankaj Shakya
Pankaj, the syntax finally accepted by SF.
thank @jothi, I know what you mean when I go back to modify my workflow rule.
now the rule is not working. after I select the stage as Won....., the field is not updated as what I setup.
this is my settings for the workflow rules. the field update is set as
IF(ISPICKVAL(StageName, "Won - AGREEMENT SIGNED & ACCEPTED"), PO_Contract_Effective_Date__c ,TODAY())
it looks correct, why it doesn't take effective?
thanks very much
Carol
Please use formula editor in "Field update" on WFR :
It helps us to update today's date in that "ContractSigningDate" field.
Thanks,
Jega