Dynamics crm 2011 Dynamics CRM 2011-fetch xml sum返回NULL而不是0
我有一个fetchXMl,它执行简单的“求和”查询Dynamics crm 2011 Dynamics CRM 2011-fetch xml sum返回NULL而不是0,dynamics-crm-2011,fetchxml,Dynamics Crm 2011,Fetchxml,我有一个fetchXMl,它执行简单的“求和”查询 <fetch distinct='true' mapping='logical' aggregate='true'> <entity name='orb_timesheetentry'> <attribute name='orb_cost' alias='cost_sum' aggregate='sum'/> <filter type='and'> <c
<fetch distinct='true' mapping='logical' aggregate='true'>
<entity name='orb_timesheetentry'>
<attribute name='orb_cost' alias='cost_sum' aggregate='sum'/>
<filter type='and'>
<condition attribute='orb_prepaidpack' operator='eq' value='{0}' />
<condition attribute='statuscode' operator='eq' value='169810003' />
</filter>
</entity>
</fetch>
问题是,如果找不到任何记录,它将返回null而不是0
有没有办法返回0而不是null?如果它是从C#执行的:
返回结果??0;
如果它是从JavaScript执行的:
if(!results)
返回0;
返回结果;
我也有同样的问题