【发布时间】:2021-03-30 18:52:34
【问题描述】:
这可行,但只能按日期过滤:
var dt = format.format({type: format.Type.DATE, value: new Date()});
search.create({ type: "supportcase", filters: [['lastmodifieddate', search.Operator.AFTER, dt]], columns: ["internalid"] }).run().getRange(0, 1000);
但这会导致 UNEXPECTED_ERROR:
var dt = format.format({type: format.Type.DATETIME, value: new Date()});
search.create({ type: "supportcase", filters: [['lastmodifieddate', search.Operator.AFTER, dt]], columns: ["internalid"] }).run().getRange(0, 1000);
format.Type.DATETIMETZ 也会导致 UNEXPECTED_ERROR。
日期不够,我需要按日期和时间过滤。
搜索 UI 允许按日期和时间过滤 lastmodifieddate:
在 NS 工作了几年后,我不应该对这有多困难感到失望,但我确实如此。
【问题讨论】:
-
如果搜索运算符和字段的组合支持添加时间,请检查搜索 UI。上次修改日期和创建日期允许时间,而开始日期似乎不允许。
-
@Brian 确实如此,请参阅更新后的问题
标签: datetime filter netsuite suitescript2.0