RE: invalid fetch xml error
Hi,
Try this,
string fetchxmlAccholding = string.Format(@"<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>
<entity name='new_productholding'>
<attribute name='new_productholdingid' />
<attribute name='new_name' />
<attribute name='createdon' />
<order attribute='new_name' descending='false' />
<filter type='and'>
<condition attribute='new_clientid' operator='eq' value='{0}' />
<condition attribute='new_clientcaseid' operator='eq' value='{1}' />
</filter>
<link-entity name='new_casestage' from='new_casestageid' to='new_remediationstatusid' alias='ad'/>
<attribute name='new_casestagename' />
</link-entity>
</entity>
</fetch>",ClientId ,ClientCaseId );
{0} in the First Line of your Fetch xml is you use it or put that mistaken if you have some value on that so please use below code
string fetchxmlAccholding = string.Format(@"<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false' {0}>
<entity name='new_productholding'>
<attribute name='new_productholdingid' />
<attribute name='new_name' />
<attribute name='createdon' />
<order attribute='new_name' descending='false' />
<filter type='and'>
<condition attribute='new_clientid' operator='eq' value='{1}' />
<condition attribute='new_clientcaseid' operator='eq' value='{2}' />
</filter>
<link-entity name='new_casestage' from='new_casestageid' to='new_remediationstatusid' alias='ad'/>
<attribute name='new_casestagename' />
</link-entity>
</entity>
</fetch>",HERE PUT THAT VARIABLE,ClientId ,ClientCaseId );