Hi,
Can any 1 help on how to include the order attribute based on conditions. Because I am reusing the fetchXML for multiple methods. so for each method I have to sort by specific attributes.
@"<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>
<entity name='asisanyuserassociation'>
<attribute name='asisanyid' />
<attribute name='amyorganization' />
<attribute name='aorgid' />
<attribute name='auserid' />
<attribute name='aid' />
<attribute name='aispreferred'/>
<attribute name='amysysid'/>
<attribute name='amydid'/>
<attribute name='ausercode'/>
<attribute name='asisanyuserassociationtype'/>
<link-entity name='auser' from='auserid' to='auserid' visible='false' link-type='outer' alias='CDAuserLnk'>
<attribute name='anamelocation' />
<attribute name='aid' />
<attribute name='asapcode'/>
<attribute name='amyorganization'/>
<attribute name='aorgid'/>
<link-entity name='aorg' from='aorgid' to='aorgid' visible='false' link-type='outer' alias='CDAuserorgLnk'>
<attribute name='aname' />
<attribute name='aenum' />
<attribute name='aalias1' />
</link-entity>
</ link-entity>
<link-entity name='amysys' from='amysysid' to='amysysid' visible='false' link-type='outer' alias='CDAmysysLnk'>
<attribute name='aid' />
<attribute name='aserialnumber' />
<attribute name='aeqmodelid' />
<attribute name='aeqproductlineid' />
<attribute name='aorgid' />
<link-entity name='amysysmodel' from='amysysmodelid' to='aeqmodelid' visible='false' link-type='outer' alias='CDAmysysModelLnkEntity'>
<attribute name='aid' />
<attribute name='aname' />
</link-entity>
<link-entity name='amysysproductline' from='amysysproductlineid' to='aeqproductlineid' visible='false' link-type='outer' alias='CDAmysysProductLineLnkEntity'>
<attribute name='aid' />
<attribute name='aname' />
</link-entity>
<link-entity name='aorg' from='aorgid' to='aorgid' visible='false' link-type='outer' alias='CDAmysysorgLnkEntity'>
<attribute name='aname' />
<attribute name='aenum' />
<attribute name='aalias1' />
</link-entity>
</link-entity>
<link-entity name='amyd' from='amydid' to='amydid' visible='false' link-type='outer' alias='CDAmydLnk'>
<attribute name='aid' />
<attribute name='asn' />
<attribute name='aname' />
<attribute name='amysysid' />
<attribute name='amydmodelid' />
<link-entity name='amydmodel' from='amydmodelid' to='amydmodelid' visible='false' link-type='outer' alias='CDAmydModelLnkEntity'>
<attribute name='apartnumber' />
<attribute name='aisconnected' />
<attribute name='aname' />
<attribute name='aorgid'/>
<link-entity name='aorg' from='aorgid' to='aorgid' visible='false' link-type='outer' alias='CDAmydModelorgLnkEntity'>
<attribute name='aname' />
<attribute name='aenum' />
<attribute name='aalias1' />
</link-entity>
</link-entity>
</link-entity>
<link-entity name='aorg' from='aorgid' to='aorgid' visible='false' link-type='outer' alias='CDAorgLnk'>
<attribute name='aname' />
<attribute name='aenum' />
<attribute name='aalias1' />
</link-entity>
<filter type='and'>
<condition attribute='statecode' operator='eq' value='0'/>
</filter>
<filter type='and'>" + criteriaCheck+"</filter></entity></fetch>";
Please help...!
*This post is locked for comments