微软动态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,需要删除该字段后重建。

最新文章

  1. PDO运用
  2. MyEclipse新建web project和navicat110_mysql_en工具
  3. statusbarhidden stuff 状态栏的各种特性
  4. DBNull.Value 字段的用法
  5. C# ORM—Entity Framework 之Database first(数据库优先)&Model First(模型优先)(一)
  6. using 1.7 requires using android build tools version 19 or later
  7. char、varchar和nvarchar的区别
  8. 13个不可不知的ASP.NET MVC扩展点
  9. wpf ListBox 双击事件时在子项添加Style 确保选中
  10. ubuntu apache 安装awstats 流量分析工具(命令方式)
  11. 2017人生总结(MECE分析法)
  12. 16进制字符串转QByteArray,char转16进制字符串
  13. 有趣的JavaScript隐式类型转换
  14. 《linux就该这么学》找到一本不错的Linux电子书,《Linux就该这么学》。
  15. Linq与Lambda
  16. centos7.2 源码编译安装php7.2.4 apache2.4.37 https证书安装
  17. python float()
  18. ASP.NET Core MVC中Controller的Action如何直接使用Response.Body的Stream流输出数据
  19. 支付宝pc端支付接入PHP实现
  20. warning LNK4070的解决办法

热门文章

  1. 什么是StatefulSet
  2. Centos7 下 PHP 添加缺少的组件 sockets 和 openssl
  3. C# 重置IE安全等级
  4. goweb- 对请求的处理
  5. Cobalt Strike系列教程第三章:菜单栏与视图
  6. Cobalt Strike系列教程第一章:简介与安装
  7. ArcGIS api for JavaScript 3.27 聚合(cluster)
  8. LogMiner Utility Release 8i - 11g (Doc ID 291686.1)
  9. TED演讲积累。
  10. WPF 绑定属性 XAML 时间格式化