Home
»
Microsoft Dynamics AX
»
Dilip's blog on MICROSOFT DYNAMICS AX
»
Error executing code: The field with id 0 does not exist in table
Error executing code: The field with id 0 does not exist in table
About
Dilip's blog on MICROSOFT DYNAMICS AX
Greetings! Welcome to my Microsoft Dynamics AX and related Microsoft Technologies blog.
Options
RSS for posts
Related Posts
How to Install and Configure Dynamics AX 2012 SCOM Pack
by
Dilip
on
19 Dec 2011
0
comments
Update - Troubleshooting Dynamics AX 2012 Services Error Creation has been cancelled
by
Dilip
on
11 Oct 2011
0
comments
Dynamics AX Error executing code: Overflow in internal run stack
by
Dilip
on
3 Nov 2011
0
comments
View More
Error executing code: The field with id 0 does not exist in table
Dilip
25 Oct 2011 2:28 PM
Comments
0
Had been busy past couple of days as was involved in writing a complex API which looks onto the Inventory Cost Breakdown tree and writes the data into a custom table after doing some transformation of data on the go.
As I was developing, I bumped into this run time error:
Error executing code: The field with id 0 does not exist in table
Investigation:
As usual, I googled about this error and came across this blogpost here
http://daxline.blogspot.com/2011/08/field-with-id-0-does-not-exist-in-table.html
, It's the exact error but the circumstances were different, It talks about the missing field in map whereas in my case I was not using any Maps.
Solution:
It didn't took me long to troubleshoot the issue as I figured out that the table buffer was getting populated incorrectly, meaning I was inheriting the standard AX InventSettlementTreeNodeCalc class for my API and internally, it was calling a method for calculating the adjustments which I didn't require at that stage in the process, and this adjustment call was populating the settlement table buffer and returning it to Inventtrans table buffer thereby giving a run-time error.
Corrected the table buffers and removed the extra call to calculate adjustments as I was doing it towards the end of the process in a separate routine,
$core_v2_language.FormatString($core_v2_language.GetResource('Blog_PostQuestionAnswerView_CommentsCountFormatString'), $post.CommentCount)
Read the complete post at
daxdilip.blogspot.com/.../error-executing-code-field-with-id-0.html
Dynamics AX 2012
,
Tips and Tricks
,
AX General
,
Dynamics AX 2009
,
Troubleshooting