web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Unable to update Price field in InventTableModule via X++ (works in SQL but not recognized in code)

(0) ShareShare
ReportReport
Posted on by 58
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!
3Visual.png
1SQL.png
2AOT.png
Categories:
I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    303,743 Super User 2026 Season 1 on at
    Hi Mohammed,
     
    The error can mean that you are missing a model reference in your extension model. Please check in what model the table InventTableModule and in what model the Extended Data Type for the field Price is hosted. Then add this model/these models as reference to your extension model.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 663

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 439 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 337 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans