将AND语句添加到FETCH XML中的WHERE子句中? [英] Add AND statement to WHERE clause in FETCH XML?

查看:145
本文介绍了将AND语句添加到FETCH XML中的WHERE子句中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在fetchXML下面有这个,我有一个快速的问题,想知道如何将它和语句添加到WHERE子句中:
和ip.pcssu_quantityavailable> = sod.quantity-sod.quantityshipped 到fetchXML吗?

We have this below fetchXML, I have a quick question wondering how I add this and statement to the WHERE clause: and ip.pcssu_quantityavailable >= sod.quantity - sod.quantityshipped to the fetchXML?

<fetch mapping="logical" version="1.0">
  <entity name="SalesOrder">
    <attribute name="ordernumber" />
    <attribute name="statuscode" />
    <attribute name="statuscodename" />
    <attribute name="pcssu_stockavailable" />
    <filter>
      <condition attribute="statuscode" operator="eq" value="141560004" />
    </filter>
    <link-entity name="SalesOrderDetail" from="salesorderid" to="salesorderid" alias="sod" link-type="inner">
      <attribute name="productidname" />
      <attribute name="quantity" />
      <attribute name="quantityshipped" />
      <link-entity name="pcssu_inventoryproduct" from="pcssu_product" to="productid" alias="ip" link-type="inner">
        <attribute name="pcssu_quantityavailable" />
      </link-entity>
    </link-entity>
    <link-entity name="account" from="accountnumber" to="pcssu_servicecentrecode" alias="a" link-type="inner" />
  </entity>
</fetch>


推荐答案

恐怕FetchXml不支持句法。我真的很抱歉另外,为了使获取工作更容易,请使用小写的实体名称,例如salesorder和salesorderdetail(不是SalesOrder和SalesOrderDetail)。

I'm afraid that FetchXml doesn't support such syntax. I'm really sorry for that. Also to make your fetch work use your entity names lowercased like salesorder and salesorderdetail (not SalesOrder and SalesOrderDetail).

这篇关于将AND语句添加到FETCH XML中的WHERE子句中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆