Hi all!!! I have department and contact classes! Every contact has appropriate department_number. I want to add number of my new contact from MAX + 1. And I try to do this:
C#private Int32 _MaxRate;
public Int32 MaxRate
{
get
{
try
{
_MaxRate = (Int32)Session.Evaluate<Contact>(new AggregateOperand("", "Number", Aggregate.Max), CriteriaOperator.Parse("Department.NumberOfDepartment = 'this.NumberOfdepartment'"));
}
catch (Exception)
{
}
return _MaxRate;
}
}
I want to fined MAX number of my contact from current department! First it mast filter by department and then fined MAX from current! But my code working wrong! Where I have mistake?