function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Filter is not enable for old/New Value by salesforce in SOQL,But you can run for loop and make list<> ,For filtered data.
Thanks For replay can you please elaborate your answer if possible with example it helps me understand clearly please
Many Thanks
Siva
List<String> StatusChangedID ;
List<CaseHistory> CH = [SELECT Id, CaseId, Field, CreatedById, CreatedDate, IsDeleted, NewValue, OldValue FROM CaseHistory where Field = 'Status' ] ;
For (Integer I = 0;CH.size() > I ; I++){
If(CH[I].NewValue == 'Closed' && CH[I].OldValue == 'Open'){
StatusChangedID.add (CH[I].Id);
}
}
If(!StatusChangedID.IsEmpty()){
// User StatusChangedID list as you requirment
}