Hello, i want to create a function that create dynamic output column from xml, so i create a function that
receive a string parameter, ( the fetch Xml)and also a collection of strings ( Parameters ) , these parameters will have a key and a value , thes parameters will replace parameter in the FetchXML string and return a EntiyCollection,
this is my function :
ublic EntityCollection ConvertFtechXML(string fetchxml, List<myClass> parameters)
{
parameters = new List<myClass>
{
new myClass { key = "", value = "" },
};
//example of fetchxml query:
fetchxml = @"<fetch mapping='logical'>
<entity name='account'> <attribute name='accountid'/>
<attribute name='name'/>
<link-entity name='systemuser' to='owninguser'>
<filter type='and'>
<condition attribute='lastname' operator='ne' value='@Value' />
</filter>
</link-entity>
</entity>
</fetch> ";
EntityCollection result = organisationService.RetrieveMultiple(new FetchExpression(fetchxml));
return result;
}
My problem is how to call this function to create dynamic output column from xml like this link in msdn to create an output
from dataTable; in my case i want to create an output form fetchxml
https://msdn.microsoft.com/en-us/library/ms136088.aspx