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

Need Help very urgent!!!!



I have Picklist  and Date fields in a Object, if the date is less that today then the picklist value should changed into expired. I.e.. When I choose the date of today,tomorrow the picklist should automatically change the value to expired.


Please Help me in this, It is very urgent for me...


Sounds like you can just use a workflow to achieve this field update.


Hi Alex


I have tried Workflow, but it isn't work, because when I given the expired date is yesterday and when I see the record today, it is not updated the picklist. When I edit and save the record then it is updating.. I don't know how to resolve it, because I have tried workflow and triggers and I am not able to achieve it.


Is there any other way to resolve this issue...




Got it, so you want your record to auto update your picklist once your expiration date happens.



1) In order to achieve this without having to update the record manually, you'll have to create a schedulable class. This schedulable class will have to run once a day and query for records matching this criteria and update these values. This schedulable class will probably have to run in junction with a batchable class so avoid any govenor limits as well.

2) Otherwise you can always download an app from the appexhange to do mass updating manually based on your list view criteria.


You could also do a time based workflow to trigger 1 day after the expired date.


Set the rule to fire when created or updated and did not previously meet the criteria.

Set criteria = ISCHANGED(exiprydate) and NOT(ISBLANK(expiryDate)) **may have to use isnull, not sure of the top of my head**


Then have the workflow update the picklist.