Showing posts with label Inventory dimension. Show all posts
Showing posts with label Inventory dimension. Show all posts

Thursday, January 5, 2012

Calling the InventTransferJournalService in AX 2012

The following is the code (written by Becky Newel from Microsoft) to call the InventTransferJournalJournalService in AX 2012.

TransferJournalServiceClient client = new TransferJournalServiceClient();
CallContext context = new CallContext();
AxdTransferJournal journal = new AxdTransferJournal();
AxdEntity_InventJournalTable journalHeader = new AxdEntity_InventJournalTable();
AxdEntity_InventJournalTrans inventJournalTrans = new AxdEntity_InventJournalTrans();


journalHeader.JournalNameId = "ITrf";
inventJournalTrans.ItemId = "1000";
context.Company = "ceu";


AxdEntity_InventDimIssue inventDimIssue = new AxdEntity_InventDimIssue();
inventDimIssue.InventSiteId = "2";
inventDimIssue.InventLocationId = "21";
inventJournalTrans.InventDimIssue = new AxdEntity_InventDimIssue[1] { inventDimIssue };


AxdEntity_InventDimReceipt inventDimReceipt = new AxdEntity_InventDimReceipt();
inventDimReceipt.InventSiteId = "1";
inventDimReceipt.InventLocationId = "11";
inventJournalTrans.InventDimReceipt = new AxdEntity_InventDimReceipt[1] { inventDimReceipt };


journalHeader.InventJournalTrans = new AxdEntity_InventJournalTrans[1] {inventJournalTrans };
journal.InventJournalTable = new AxdEntity_InventJournalTable[1] { journalHeader };

 try
{            
           client.create(context, journal);
}
catch (Exception e)
{              
string error = e.Message;
Console.ReadLine();
}


Take Care!

Tuesday, April 26, 2011

Best Practice Check execution - Multisite in AX 2009 - Specific Checks - Tables - Inventory dimension fields are handled by multisite activation

When upgrading from an older version to AX 2009, the multisite function is, by default, inactive. Ususally when you activate Multisites in AX 2009, you may have an error message saying:

"The Multisite wizard is not up-to date"

This means that some new InventDim fields have been added to some tables and the wizard cannot run. There are many ways to fix this, but I found that by executing a Best Practice Check is the best way to do this.

On the Microsoft white paper about multisites (http://www.ax-pact.com/downloads/Multisite%20Activation%20White%20Paper%20for%20Microsoft%20Dynamics%20AX%202009%20.pdf) they suggest doing this, but they don't tell you where to run the Best Practices Check from.

To do so follow the next steps: