Hello Experts,
The execution result is as expected, but the title error appears when debugging.
How can I avoid this compilation error?
Designed as follow.
There are a string control, an OK button and a Grid on a form.
Select a value in the string control and press the OK button to display the processing result in the Grid.
It is implemented as below.
1.override form’s init() method and initialize another tempDB buffer of the same type and link its physical instance to the current data source buffer.
2. I created a method in the form method that inserts data into a TempDB table whose table type is TempDB.
3. After pressing the OK button, get the form's string controls and call the PopulatesRecords method to insert data into the TempDB table. Then link the returned TemTable to the form data source.
4.The form's data source is set to a TempDB table.
The following is code.
public class TestSearchEnumForm extends FormRun { public void init() { TestInfoTemp tempTable; super(); TestEnumName testEnumName = EnumName.text(); delete_from tempTable; tempTable = element.populateRecords(testEnumName); TestInfoTemp.linkPhysicalTableInstance(tempTable); } public TestEnumInfoTemp populateRecords(TestEnumName _testEnumName) { TestInfoTemp tempTable; if (_testEnumName) { delete_from tempTable; ttsbegin; tempTable.field1 = text1; tempTable.field2 = text2; tempTable.insert(); } return tempTable; } [Control("CommandButton")] class OKCommandButton { ////// /// public void clicked() { TestEnumInfoTemp tempTable; super(); // get value from form string control. TestEnumName testEnumName = EnumName.text(); DictEnum dictEnum = new DictEnum(enumName2Id(testEnumName)); if (dictEnum) { // Insert data to TempDB table. tempTable = element.populateRecords(testEnumName); delete_from TestEnumInfoTemp; // TestEnumInfoTemp is the form datasource whose table type is TempDB. TestEnumInfoTemp.linkPhysicalTableInstance(tempTable); } } } }
Any advice would be greatly appreciated.
Sure, this has absolutely nothing to do with data source properties. It's all about the Watch window in debugger, which is used for a quick access to variables that you're interested in.
As I already told you cannot see the current record for the FormDataSource buffer and also ignore this kind of error as it will not affect your process.
Thanks,
Girish S.
Hi Martin,
I haven't set anything in the FormDatasource properties.
You're looking at the Watch window. There you seem to have an expression that can't be meaningfully evaluated in the current method. It seems that you want to display the value of FormDatasource property of FormName object, but no FormName object exists there.
If requirement working without any issue, then probably you can ignore debugging issue.
If you want to learn more on this error, check this thread
I think this is not the run time or compile time error. It's related to the debugger. Also, TestEnumInfoTemp is the DataSource name, and it won't have value at the debugger watch window.
So, my suggestion will be ignoring this error.
Thanks,
Girish S.
The error that occurs during debugging is line 46.
Yes, without debugging, the whole process runs fine.
I'm getting the expected results.
I posted a question because I was worried that an error had occurred during debugging.
following is debugging error.
But, Microsoft.Dynamics.Ax.Xpp.Common.linkPhysicalTableInstance returned in Local tab is True.
Should I ignore this error?
Thanks.
While debugging exactly at what line error is throwing?
Without debugging does the whole process run without any issues?
Thanks,
Girish S.
Hi Girish,
I mean Debugging error. There is no error when building the project.
Sorry, I added the 39 line for "if(dictEnum)" .
Thanks.
Hi akshi,
Are you saying that you are getting a compile time error while building the project?
On line number 39 what does this line "if(dictEnum)" means?
Thanks,
Girish S.
André Arnaud de Cal...
292,031
Super User 2025 Season 1
Martin Dráb
230,868
Most Valuable Professional
nmaenpaa
101,156