FetchXML 大于
我正在使用 FetxhXML,并且我希望条件大于一定的小时数。
这就是我所拥有的:
string groupby1 = "<fetch distinct='false' mapping='logical' aggregate='true'>" +
"<entity name='opportunity'>" +
"<attribute name='opportunityid' alias='opportunity_count' aggregate='countcolumn' />" +
"<filter type='and'>" +
"<condition attribute='new_leadstatus' operator='eq' value='100000000' />" +
"<condition attribute='new_emailedtorsm' operator='eq' value='false' />" +
"<condition attribute='ownerid' operator='not-null' />" +
"<condition attribute='createdon' operator='last-x-hours' value='1' />" +
"</filter>" +
"<attribute name='ownerid' alias='ownerid' groupby='true' />" +
"<link-entity name='systemuser' from='systemuserid' to='ownerid'>" +
"<attribute name='internalemailaddress' alias='internalemailaddress' groupby='true' />" +
"</link-entity>" +
"</entity>" +
"</fetch>";
所以基本上在创建条件下我希望它大于 1 小时或大于最后 x 小时。这可能吗?
I am using FetxhXML and I want the condition to be greater than a certain number of hours.
This is what I have:
string groupby1 = "<fetch distinct='false' mapping='logical' aggregate='true'>" +
"<entity name='opportunity'>" +
"<attribute name='opportunityid' alias='opportunity_count' aggregate='countcolumn' />" +
"<filter type='and'>" +
"<condition attribute='new_leadstatus' operator='eq' value='100000000' />" +
"<condition attribute='new_emailedtorsm' operator='eq' value='false' />" +
"<condition attribute='ownerid' operator='not-null' />" +
"<condition attribute='createdon' operator='last-x-hours' value='1' />" +
"</filter>" +
"<attribute name='ownerid' alias='ownerid' groupby='true' />" +
"<link-entity name='systemuser' from='systemuserid' to='ownerid'>" +
"<attribute name='internalemailaddress' alias='internalemailaddress' groupby='true' />" +
"</link-entity>" +
"</entity>" +
"</fetch>";
So basically on the createdon condition I would want it to be greater than 1 hour or greater than the last x hours. Is this possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要使用 on-or-before 条件并插入当前时间前一小时的您自己的 DateTime,如下所示:
You'll need to use the on-or-before condition and insert your own DateTime that is one hour before the current time, like so: