+ Start a Discussion

Compare a date on Opportunity object

I was not sure where to post this so I am sorry if this is the wrong area.  I need some ideas on what the best solution would be.


We want to alert a user when they view an opportunity if the CloseDate is less than today and do not know the best way to go about it.


Could someone please give me an idea or an example of where this is done.


I hope this makes sense




Have you thought about using a formula field that checks the close date, and if > x days old displays a particular color or image?


Check out http://www.salesforce.com/community/assets/docs/Sample_Image_Formula_Fields_Customization_Guide.pdf 

I'm assuming you don't want a hard coded validation error. Maybe just the soft alert of some kind?

This can be achieved by workflow configuration.


-Create a workflow rule 'Opportunity Close Date less than Today's Date' on Opportunity object

-Set Rule Criteria to : CloseDate < Today()

-Create Immediate Action as Task : 'Close Date less than Today's Date!' assigned to User/Role/Owner

-Create an opportunity record with Closed Date as 1st Mar(less than Today's Date)

-The task will be created and it will be present in concerned user/role/owner's My Tasks Related list on Home Page or 

 as task in Open Activities related list in Opportunity record


Hope this helps....






Force.com Certified Salesforce.com Developer