Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

Computed Column in a View Dynamics AX

$
0
0

I have been trying to add a computed column to a view.

I want to add the "createdDateTime" field from the source and edit the time part of the field as 00:00:00.

I know the T-sql query that can be used to achieve it, but not having any luck trying to convert it to x++ code.

Tried many different variations of SysComputedColumn to achieve it, but no luck.

The T-sql query equivalent is

"DATEADD(HOUR, 0, CAST(CAST(T1.CREATEDDATETIME AS DATE) AS DATETIME)) AS CREATEDDATE1"

and this is the code that adds the value from the source to the computed column but i don't know how to set time as 00:00:00

"SysComputedColumn::returnField(viewName, identifierStr(MROWorkordertable), fieldstr(MROWorkOrderTable,CreatedDateTime))".

Any help would be appreciated.


Viewing all articles
Browse latest Browse all 72043


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>