Hi Techies,
I have customized/extended EntAssetWorkOrderView to update a additional fields in Cube(EntAssetAggregateMeasurement).
There are few fields for which we need to write a method to get the value. e.g. ResponsibleWorker, it's a RecId, we need to fetch an Employee name based on this and show on view.
It seems we can only use the static methods in this scenario. We've followed steps from below MS link to get Employee name from ResponsibleWorker. but the value do not show in cube.
https://docs.microsoft.com/en-us/dynamicsax-2012/developer/walkthrough-add-a-computed-column-to-a-view
Seems there is some issue in code we are trying. Below is a code snippet. Can anyone help anything need to be updated here please-
RecId responsibleWorker = str2Int64(SysComputedColumn::returnField(tablestr(EntAssetWorkOrderView),
identifierstr(EntAssetWorkOrderTable),
fieldStr(EntAssetWorkOrderTable, ResponsibleWorker)));
str responsibleWorkerName = HcmWorker::find(EntAssetWorker::find(responsibleWorker).HcmWorker).name();
return responsibleWorkerName;
Any response is appreciated.
Thank you.