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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

please suugest me how to relate InventDim and inventTable for data updation

(0) ShareShare
ReportReport
Posted on by

Hi guys,

I have to update purchase warehouse , sales warehouse and stock warehouse for the set of items.

You can fine these fields for the particular item under "site specific order settings".

Can anyone please tell me how to relate these table inventDim and inventable as  i found there is no direct relation exist for relating them.


Regards,
Pankaj Kumar
MSD AX Technical Consultant

*This post is locked for comments

I have the same question (0)
  • Verified answer
    zeeshan.shaikh Profile Picture
    683 on at
    RE: please suugest me how to relate InventDim and inventTable for data updation

    You can use below tables to update the warehouse on site specific and default order settings:

    1. InventItemInventSetup

    2. InventItemPurchSetup

    3. InventItemSalesSetup

    See their relations with inventDim and inventTable.

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: please suugest me how to relate InventDim and inventTable for data updation

    Thanks for the reply. I have written this job by using these tables.

    ------------------------------------------------------------------------

    static void WarehouseUpdation(Args _args)

    {

       InventTable             inventTable;

       InventDim               inventDim;

       InventItemPurchSetup    inventItemPurchSetup;

       InventItemSalesSetup    inventItemSalesSetup;

       InventItemInventSetup   inventItemInventSetup;

       int                     noOfRecords;

       ;

       inventDim.InventLocationId = "020305";

       inventDim = InventDim::findOrCreate(inventDim);

       while select inventTable

       where inventTable.ItemId like "YS3*"

       {

           ttsbegin;

           select forupdate inventItemPurchSetup

               where inventItemPurchSetup.ItemId == inventTable.ItemId;

           {

               inventItemPurchSetup.InventDimIdDefault = inventDim.inventDimId;

               inventItemPurchSetup.doUpdate();

           }

           select forupdate inventItemSalesSetup

               where inventItemSalesSetup.ItemId == inventTable.ItemId;

           {

               inventItemSalesSetup.InventDimIdDefault = inventDim.inventDimId;

               inventItemSalesSetup.doUpdate();

           }

           select forupdate inventItemInventSetup

               where inventItemInventSetup.ItemId == inventTable.ItemId;

           {

               inventItemInventSetup.InventDimIdDefault = inventDim.inventDimId;

               inventItemInventSetup.doupdate();

           }

           ttscommit;

           noOfRecords++;

      }

       info(strFmt("No of Records updated is : %1",noOfRecords));

    }

  • zeeshan.shaikh Profile Picture
    683 on at
    RE: please suugest me how to relate InventDim and inventTable for data updation

    If you are updating site wise settings then you also must specify sites for inventDim.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Tocauer Profile Picture

Martin Tocauer 4

#2
AlissonGodoy Profile Picture

AlissonGodoy 2

#2
Community Member Profile Picture

Community Member 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans