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
rvg170550rvg170550 

Use value of Opportunity.createddate

In a validation trigger, I want to use only Opportunities created in 2008;

So, I want to include this condition in my validation trigger.

Problem is to find the correct coding for replacing the ISNEW() by CREATEDDATE >= '2008-01-01'

Rule NameOpportunity_CategoryActiveChecked
Error Condition FormulaAND(
OR(ISPICKVAL(StageName,"Pending."),
ISPICKVAL(StageName,"Tentative."),
ISPICKVAL(StageName,"Accepted."),
ISPICKVAL(StageName,"Signed."),
ISPICKVAL(StageName,"Refused."),
ISPICKVAL(StageName,"Cancelled."),
ISPICKVAL(StageName,"Declined."),
ISPICKVAL(StageName,"Aborted."),
ISPICKVAL(StageName,"On Hold.")),
ISPICKVAL(Opportunity_Category__c,""),
ISNEW()
)
Error MessageAs of Stage='Pending', Opportunity Category should be presentError LocationOpportunity Category
DescriptionAs of stage = 'Pending', Opportunity Category has to be present
Created ByRoger Vangoidsenoven, 12/02/2008 13:14Modified ByRoger Vangoidsenoven, 13/02/2008 10:06