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
vijaya kudupudivijaya kudupudi 

how to update a picklist field based on the picklist value and modified date?

Hi,

How to update a picklist feild based on the the picklist value and modified date. Please assume that i have piclist feild named as stage. If the stage is "Qualification" and the modified date is one day before it should automatically update the picklist field as "closed". How to get this ? please some one help me. I am new to salesforce.
karunakarreddy bade 8karunakarreddy bade 8
hi vijaya,

Using the formula field you can update your picklist fields.

The if statement syntax is like this:

IF(logical_test, value_if_true, value_if_false)
Checks whether a condition is true, and returns one value if TRUE and another value if FALSE.

example:

IF(OR(
ISICKVAL(Field_1__c,"Value1"),
ISICKVAL(Field_1__c,"Value2"),
ISICKVAL(Field_1__c,"Value3"),
ISICKVAL(Field_1__c,"Value4"),
ISICKVAL(Field_1__c,"Value5"))(CloseDate  - 1), null)


Thanks,
B.karunakar
vijaya kudupudivijaya kudupudi
How can i use formula field? Because i want to update the same picklist field. It should be editable.

Just consider a status field in an object. Initially user choose one status(open) while creating/editing the record. After one day that means modified must be the yesterday then i want to change the status as some other value. 

cloud you please tell solution for my scenario?
Dhushyanth kumar KDhushyanth kumar K
your requirement is not clear.
vijaya kudupudivijaya kudupudi
If the picklist value has not been changed for certain period (for example 1 week after created/edited) then, I want to automatically update that picklist value to another value of the same picklist(after 1 week).