Hi,
This is blocking development and I couldn’t find a clear explanation.
I am trying to update the Price field (Base sales price under the Sell tab) for a released product in Microsoft Dynamics 365 Finance and Operations.
The value is stored in the InventTableModule table (ModuleType = Sales).
The field definitely exists and is working correctly at the database level. For example, the following SQL query successfully updates the value:
update InventTableModule
set PRICE = 500
where ITEMID = '000123' and MODULETYPE = 2
(Please find attached screenshot "1SQL")
However, when I try to do the same in X++, I get this error:
"The name 'Price' does not denote a class, a table, or an extended data type."
(Please find attached screenshots "2AOT", "3Visual")
Here is the X++ code I am using:
InventTableModule inventTableModule;
select forUpdate inventTableModule
where inventTableModule.ItemId == "000123"
&& inventTableModule.ModuleType == ModuleInventPurchSales::Sales;
inventTableModule.Price = 500;
inventTableModule.update();
Additional details:
- I am trying to update the "Base sales price" from the Sell tab in the Released product form
- The Price field is visible in AOT under InventTableModule → Fields
- It is also used in standard methods (e.g. initFromInventItemPriceSim)
- SQL update works without any issue
- The error only occurs in X++
What could cause a field to exist in SQL and AOT but not be recognized in X++ code?
Could this be related to:
- Metadata synchronization issues?
- Extensions overriding the table?
- Cache/build problems?
Any guidance would be appreciated.
Thanks!