Computed column and virtual field in D365
Computed column and virtual field: Requirement: Display methods needed in entity/view Solution: There are two different approaches for adding additional unmapped fields beyond those that are directly mapped to fields of the data sources. 1. Computed column (SQL query executed by Microsoft SQL Server) 2. Virtual Field (Custom X++ code) · Computed Column: The computed column method returns a T-SQL query. It hits during database synchronization and is written to the database. In runtime no x++ code is executed, instead, your T-SQL query is executed inside the database. It is mostly used for reads/exports. Performance wise it is better than virtual methods. Equivalent X++ query: select sum (amount) from consignmentProductReceiptJournalLine where consignmentProductReceiptJournalLine.ReplenishmentOrderLine =...