top of page

Microsoft Dynamics AX – Wrong Project Timesheet Category Displayed

Some call it a “bug” – we think of it as an “opportunity” for improvement. Our team has recently encountered an issue in the "Project management and accounting" module particularly related to the "All timesheets" list-page, and we would like to share the resolution options with the AX world. This challenge seems to be persistent in all AX2012 versions.

The defect can be described in following manner: the category value displayed in the "Timesheet lines" info-part does not match the real value from the timesheet line.

Analyzing the TSTimesheetsListPagePreviewPane info part we can see that values for some fields like "Activity" and "Category" will be returned by respective edit methods from TSTimesheetLine table:

Obviously, the method \Data Dictionary\Tables\TSTimesheetLine\Methods\activityTxt will be called prior \Data Dictionary\Tables\TSTimesheetLine\Methods\categoryName because of the order of the fields in the layout. These edit methods can act like "get" or "set" depending of the _set parameter. The parameter _set = false means that no changes will be performed against the values of respective fields.

During the debugging process it was determined that the activityTxt() works incorrectly in the "get" scenario. More specifically, in case of _set = false the method setCategoryIdFromActivity() is executed, which is not correct.

The existing code overrides the category value of the timesheet line with default category set on activity. As shown below, when the categoryName() method is called, it will return the name based on the CategoryId set during activityTxt() method execution, but not the name of the category from the timesheet line:

To fix the issue simply remove the line highlighted in red. Thus, the category will not change, because the activity value are not modified, and these methods will return the existing values.

Microsoft is aware of the problem, however no hotfix is issued to date.

Have other Microsoft Dynamics AX Inquires or needs? Visit our Help Desk for AX page to see how our experts can help!

For more information please contact Ellipse Solutions at info@ellipsesolutions.com or by calling our corporate office at (937) 312-1547.

Recent Posts
Search By Tags
bottom of page