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
New_DeveloperNew_Developer 

validation rule

HI 

 

How can i make a validation rule fire only for new cases i.r, created only after july 2012 and do not effect the historical cases.

TrimbleAgTrimbleAg

If you use the ISNEW statement it should resolve your issue and only fire on new items.

 

PB

New_DeveloperNew_Developer

Its not working

 

below is my validation rule

 

AND(ISNEW(),
OR($RecordType.Name = ' Record Type 1',$RecordType.Name = ' Record Type 2'),
OR(
ISPICKVAL(Product__c," B 10"),
ISPICKVAL(Product__c,"B 20")
),
$Profile.Name <>'Integration Administration',
ISPICKVAL(product_Used__c,""),
Datevalue(CreatedDate) > DATE(2012, 06, 11)
)

ChrisB760ChrisB760

The problem might not actually be the ISNEW() statement -- although I would just make things easier and do CreatedDate > Date(2012,6,1) -- but might actually be the record type part of the validation.  The record type usually has to refer to the salesforce ID of the record type when you use it in a lot of different contexts I've found.  I've never used it in a validation, but it wouldn't surprise me if the same holds true for those too.  To figure out what the salesforce ID is of the record tpe, you can either click on it in the object setup and it's the "id=" part of the URL, or if you have Chrome, right click on the record type picklist when you create a record, and all the different text values along with their Salesforce ID equivelant will be listed in the source code.