Hi Guys,
My requirement is to get attribute fields data from Fetch XML through custom workflow.
I have approach retrievemultiple with fetchxml query.
I got the count of the records through fetchxml and now i want to get the first column data of fetchxml through custom workflow.
In the below image, i want to get the "Subject" column data.
Below logic:
string query2 = @"<fetch version='1.0' mapping='logical' distinct='false' >
<entity name='task'>
<attribute name='subject' alias='task_count' />
<order attribute='subject' descending='false' />
<filter type='and'>
<condition attribute='statecode' operator='eq' value='0' />
</filter>
</entity>
</fetch>";
EntityCollection result = service.RetrieveMultiple(new FetchExpression(query2));
foreach (var c in result.Entities)
{
string aggregate = c.Attributes["subject"].ToString();
}
}
//string contactField2 = contact.GetAttributeValue<string>("firstname");- is working for only first record.
By this logic i got only first value. Can any suggest me the solution to get the data first column through fetchxml.
*This post is locked for comments