Friday 6 July 2018

DB Sync fails - InvalidOperationException : Computed column returns empty value

Lets discuss about one of the common issue which might be the root cause of db synchronization failure. There is a scenario in which we have create a computed column that returns a value and you are using this statement for it "returns itemName".









Problem : In above screen shot there is a computed method which returns item Name. Since it is returning direct value by assigning it to a variable and there are chance that item name might be empty.
Note : It just a example, you have to map things as per your requirements for computed columns. As you know that computed columns are always used to  add computed values to a view and these columns do support sorting and filtering.

Problem : DB Sync fails - InvalidOperationException : Computed column returns empty value.

Root cause : Method is returning direct value for instance "returns itemName".

Solution : Instead of returning direct field, we need to replace the return statement with " returns SysComputerColumn class method for instance : SysComputedColumn::returnLiteral(variable name)"

No comments:

Post a Comment

Note: only a member of this blog may post a comment.

Custom Business events Part 3 - (Activate custom business event) in D365 F&O

 In this blog we will discuss about the steps to activate a custom business in D365 F&O. As we know that business event catalog does not...