Some times its easier to get fetch xml using advance find, but then to use it in query expression use the following command, this take fetchxml and then returns the query expression object
var conversionRequest = new Microsoft.Crm.Sdk.Messages.FetchXmlToQueryExpressionRequest
{
FetchXml = fetchXml
};
var conversionResponse =var conversionRequest = new Microsoft.Crm.Sdk.Messages.FetchXmlToQueryExpressionRequest
{
FetchXml = fetchXml
};
(Microsoft.Crm.Sdk.Messages.FetchXmlToQueryExpressionResponse)_service.Execute(conversionRequest);
QueryExpression queryExpression = conversionResponse.Query;
No comments:
Post a Comment