Hi,
Using the examples from the MSCRM SDK and from the web, I am trying to create a Silverlight datagrid that will show Campaign Responses against for an Account in MSCRM 2011; however I get the error 'The method or operation is not implemented.' when the OrganizationRequest["Query"]
= queryExpression; is being set.
If someone could point me into the right direction I would be most grateful!!!..
Code below but also taken from the sdk
public void getAccountList() {
try
{
QueryExpression queryExpression = new QueryExpression();
//set the entity name
queryExpression.EntityName = "account";
//add the attribute name which are used to fetch from the entity name.
queryExpression.ColumnSet = new ColumnSet();
queryExpression.ColumnSet.Columns = new ObservableCollection<string>(new string[] { "accountid", "name", "statecode", "statuscode", "primarycontactid", "accountnumber", "emailaddress1", "telephone1", "address1_shippingmethodcode" });
//set the order by expression, here order by expression used name to order the end result.
OrderExpression orderByName = new OrderExpression() { AttributeName = "name", OrderType = OrderType.Ascending };
queryExpression.Orders = new ObservableCollection<OrderExpression>();
queryExpression.Orders.Add(orderByName);
OrganizationRequest organizationRequest = new OrganizationRequest() { RequestName = "RetrieveMultiple" };
organizationRequest["Query"] = queryExpression;
IOrganizationService organizationService = SilverlightUtility.GetSoapService();
organizationService.BeginExecute(organizationRequest, new AsyncCallback(AccountList_ClickCallback), organizationService);
}
catch (Exception Ex)
{
MessageText = string.Format("Error : {0}", Ex.Message);
}
}