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>