
I am working with the LedgerTransListDate report... Which led me back to the LedgerTransListReportHelper class and the createReportData method.
I added 2 new fields to the appropriate TMP tables (there are 2).
I then added my fields to the field list of the insert_recordset and to the select. Compiles fine.
I then get an error from sql:
SQL error description: [Microsoft][SQL Server Native Client 10.0][SQL Server]The select list for the INSERT statement contains fewer items than the insert list. The number of SELECT values must match the number of INSERT columns.
That's a pretty straight forward error, however, the count in my method looked fine. So, after inspecting the sql statement a little closer I found my 2 fields PLUS a third field that has 'TZID' (Time Zone ID??) added to the end. I presume that this field is throwing the count off.
...,MYFIELD_CREATEDBY,MYFIELD_CREATEDDATETIME,MYFIELD_CREATEDDATETIMETZID,...
Any idea why this field is added to the insert list and how to make this work correctly?
*This post is locked for comments
I have the same question (0)Hi bRradlyJames,
can you please take a look at the following thread:
http://community.dynamics.com/ax/f/33/p/173963/431944
This is a similar issue.
It seems that using this System DateTime fields (setup by table properties - ModifiedDateTime, CreatedDateTime) within an insert_recordset for copying into a utcDateTime field is currently unsupported. These fields do not have a extra timezone (_TZID) column. (Which maybe can be simulated using a 'constant' value within the select field list.
But this is pure kernel functionality - only the people at MS are able to fix this.
Maybe you should launch an support request or an entry on Connect for that.
regards and sorry
Douglas