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 :
Microsoft Dynamics AX (Archived)

Inventory Table Default Dimension Update

(0) ShareShare
ReportReport
Posted on by 2,147

Hello,

I wrote a class in AOT that imports default dimension into inventory items.  The dimension was updated and shows on the AX table.  Except it is not showing on SQL server table or in AX application.  Is there another step I am missing. I synchronized the InventTable but it did not work.  Any help would be appreciated.

Thanks,

Tremor

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    304,293 Super User 2026 Season 1 on at

    Hi Tremor,

    Can you elaborate? What do you mean with it shows on AX table but not on SQL server? Can you share some examples and your coding? I assume you used the standard DefaultDimension field which is available on the InventTable table?

  • Tremor Olaes Profile Picture
    2,147 on at

    When I open the InventTable in AOT, the financial dimensions show on the table rows.  When I log into AX to look at the record, the financial dimension does not show up.  After updating the sql table InventTable, the financial dimension shows up now.  Yes, I updated the DefaultDimension field.  

  • Tremor Olaes Profile Picture
    2,147 on at

    I will share the code as soon as I get a chance.

  • Tremor Olaes Profile Picture
    2,147 on at

    This is the method I am using:

    private void updateInventoryDimension(ItemId _itemid, DimensionDefault _dimension)

    {

       //AssetTable                  assetTable;

       InventTable                 inventtable;

       boolean                 lineexists;

       try

       {

           ttsBegin;

           while select forUpdate inventtable

                   where inventtable.ItemId == _itemid

           {

               lineexists = true;

               inventtable.DefaultDimension = _dimension;

               info(strFmt("Updated Inventtable with itemid: %1, Item : %2, Dimension", _itemid, _dimension));

           }

           ttsCommit;

          if(!lineexists)

           {

               warning(strFmt("Could not find Item :  %1, Item : %2, Dimension", _itemid, _dimension));

           }

       }

       catch(Exception::Error)

       {

           error(strFmt("Error Updatiing Item :  %1, Item : %2, Dimension", _itemid, _dimension));

       }

    }

  • Verified answer
    Mea_ Profile Picture
    60,286 on at

    Hi Tremor Olaes,

    You forgot to call "update" to save changes, so it should be 

        ttsBegin;
    
        while select forUpdate inventtable
            where inventtable.ItemId == _itemid
        {
           lineexists = true;
    
           inventtable.DefaultDimension = _dimension;
           inventtable.update();
               
    info(strFmt("Updated Inventtable with itemid: %1, Item : %2, Dimension", _itemid, _dimension)); }
    ttsCommit;
  • Tremor Olaes Profile Picture
    2,147 on at

    OMG!  I cannot believe I left that out.  I actually must have deleted it.  Thanks Ievgen!!

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 26

#2
imran ul haq Profile Picture

imran ul haq 8

#3
André Arnaud de Calavon Profile Picture

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

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans