Discussions

Ask a Question
Back to All

Retrieving Task Details with RetrieveMultiple() is failing

Hi!

The code we have been using successfully for multiple integrations to retrieve the task details - RetreiveMultiple() (code below) - is failing for a new client setup with the error:

Exception: Index was outside the bounds of the array

What is the best way to determine if the client data needs some additional setup to help resolve this problem?

Thanks,

Lindsay

string taskCode = "03.0011.0008";

var taskResults = corrigoService.RetrieveMultiple(  
	new CORRIGO.QueryExpression {  
  	EntityType = CORRIGO.EntityType.Task,  
    PropertySet =  
    new CORRIGO.AllProperties(),  
    Count = 0,    
    FirstResultIndex = 0,      
    Criteria = new CORRIGO.FilterExpression() {
     	FilterOperator = CORRIGO.LogicalOperator.And,
      Conditions = new[] {
       	new CORRIGO.ConditionExpression() {
         	PropertyName = "Number",
         	Values = new object[] {
           	taskCode,  
          },
          Operator = CORRIGO.ConditionOperator.Equal
        },
      }
    },

    Distinct = true,

    Orders = new[] {
     	new CORRIGO.OrderExpression {
      	OrderType = CORRIGO.OrderType.Descending,
        PropertyName = "Id"
      }
    },
  }
);