locked
hi, I am getting this error while using the filterexpression RRS feed

  • Question

  • Error:Cannot implicitly convert type 'Microsoft.Crm.Sdk.Query.ConditionExpression[]' to 'System.Collections.ArrayList'

    I written this code

     

     ConditionExpression condition1 = new ConditionExpression();

     

                // Set the condition for the retrieval to be when the city in the account's address is Sammamish.

                condition1.AttributeName = "address1_city";

                condition1.Operator = ConditionOperator.Like;

                condition1.Values = new string[] { "Hyderabad" };

                // Create the FilterExpression.

                FilterExpression filter = new FilterExpression();

     

                // Set the properties of the FilterExpression.

                filter.FilterOperator = LogicalOperator.And;

                filter.Conditions = new ConditionExpression[] { condition1 }; \\here I am getting error


     

    Friday, February 4, 2011 6:20 AM

All replies

  • Hi J P Rao,

    Change the filter.Conditions = new ConditionExpression[] { condition1 }; 

    as

    filter. Conditions.Add( condition1 );

    Regards,

    Friday, February 4, 2011 6:59 AM
  • Actually I did it, any away thanks
    PullaRao Jala
    Friday, February 4, 2011 7:03 AM