微軟動態(tài)CRM專家羅勇 ,回復338或者20190521可方便獲取本文,同時可以在第一間得到我發(fā)布的最新博文信息,follow me. 計算字段是從Dynamics CRM 2015 SP1版本開始推出的一個好東西,詳情可以參考官方文檔 Define calculated fields to automate manual calculations ,我以前的博文也有介紹。 我發(fā)現(xiàn),我定義了如下的計算字段 (calculated field):
定義的計算公示如下:
后來我發(fā)現(xiàn)這個實體在使用Ribbon Workbench定義按鈕后,發(fā)布包括這個字段定義的實體時候會報錯,導出來以后,導入到別的環(huán)境也會報錯(Error while importing Calculated fields name new_dayssinceinvoice)。 報錯信息是:You can't use Now(), which is of type DateTime, with the current function. 根據(jù)官方的提示: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. 我才應(yīng)該是Now的行為(behavior) 是 User Local的,而我定義的計算公示中涉及到的另一個字段是 Time-Zone Independent導致的。于是我將涉及到的那個字段的Behavior改成 User Local后問題解決。當然拉,不能在界面上直接改成User Local,需要刪除該字段后重建。
|
|