Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/cmake/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Dynamics crm 2011 Dynamics CRM 2011-fetch xml sum返回NULL而不是0_Dynamics Crm 2011_Fetchxml - Fatal编程技术网

Dynamics crm 2011 Dynamics CRM 2011-fetch xml sum返回NULL而不是0

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

我有一个fetchXMl,它执行简单的“求和”查询

<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;
返回结果;

我也有同样的问题