【问题标题】:MS CRM 2011 Fetch XML Filter ExpressionsMS CRM 2011 获取 XML 过滤器表达式
【发布时间】:2013-03-14 14:24:41
【问题描述】:

我有一个 fetch xml 查询,我想过滤带有日期和 时间 字段的记录。

我使用表达式在或之前,但这似乎只过滤日期(没有时间)。

FetchXml= ...
'<filter type="and">'+
'<filter type="or">'+
    '<condition attribute="scheduledend" value="'+ currentdate +'" operator="on-or-before"/>'+
    '<condition attribute="scheduledend" operator="null"/>'+
'</filter>'+
'</filter>'+

【问题讨论】:

  • 我会使用高级查找功能,直到找到兼容的查询,然后我会将其导出为 XML ;-)

标签: dynamics-crm-2011 fetchxml


【解决方案1】:

您可以构建日期并将 0 影响到时间部分。是你想要的吗?

var date = Xrm.Page.getAttribute("createdon").getValue();
var d = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0, 0);

【讨论】:

  • 感谢您的回复。我想检查我约会的时间。例如,如果当前日期时间是 14/03/2013 17:20,我的字段日期时间是 14/03/2013 18:00,那么我的查询应该删除记录。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2012-06-07
  • 1970-01-01
  • 1970-01-01
  • 2014-03-26
  • 2023-03-08
  • 2011-12-16
  • 2015-03-13
相关资源
最近更新 更多