Dynamics 365中计算字段与Now进行计算实体导入报错:You can't use Now(), which is of type DateTime, with the current fun...

微软动态CRM专家罗勇 ,回复338或者20190521可方便获取本文,同时可以在第一间得到我发布的最新博文信息,follow me.

计算字段是从Dynamics CRM 2015 SP1版本开始推出的一个好东西,详情可以参考官方文档 Define calculated fields to automate manual calculations ,我以前的博文也有介绍。

我发现,我定义了如下的计算字段 (calculated field):

 

定义的计算公示如下:

 

 

后来我发现这个实体在使用Ribbon Workbench定义按钮后,发布包括这个字段定义的实体时候会报错,导出来以后,导入到别的环境也会报错(Error while importing Calculated fields name new_dayssinceinvoice)。

报错信息是:You can't use Now(), which is of type DateTime, with the current function.

根据官方的提示:All DIFF functions require that the first Date and Time field and the second Date and Time field have the same behavior: User Local, Date Only or Time-Zone Independent. If the behavior of the second field doesn’t match the behavior of the first field, the error message is shown, indicating that the second field can’t be used in the current function. More information: Behavior and format of the Date and Time field. 

我才应该是Now的行为(behavior) 是 User Local的,而我定义的计算公示中涉及到的另一个字段是 Time-Zone Independent导致的。于是我将涉及到的那个字段的Behavior改成 User Local后问题解决。当然拉,不能在界面上直接改成User Local,需要删除该字段后重建。

 

转载于:https://www.cnblogs.com/luoyong0201/p/Dynamics_365_Calculated_Field_Now_Import_Error.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值