Eventtype filter

Jun 2, 2009 at 1:35 PM

I'm not getting the condition filter for eventtype to work

I tried this in the CampainLogic.cs:

        CrmSdk.Picklist eventType = new Picklist();
        eventType.name = "Training";
        eventType.Value = 4;

        ConditionExpression condition1 = new ConditionExpression();
        condition1.AttributeName = "msa_eventtype";
        condition1.Operator = ConditionOperator.Equal;
        condition1.Values = new object[] { eventType };

        query.Criteria.Conditions = new ConditionExpression[]{entityActiveCondition, entityPublishedCondition, hasStartDateCondition, condition1 };

I get no result. When i remove the condition i get all the events. Is this the wrong approach?

And my second question: How do i get a list of availible EventTypes?