Tuesday, March 29, 2011

What is DMT?



DMT stands for Data Management Tool.

Basically, it is a tool which allows the import of information into Epicor in the form of a text file.

We really only use DMT when first setting up a new Epicor implementation. The thing about DMT is, it is limited.

For some tables, you still must populate the data manually, or write custom code to populate it for you.

Here are some of the tables we populate using C# and .dll files in the Epicor Software/Client folder:
SalesRep, SalesTerritory, RefCategory, AnalysisCode

In you project, add references to:


  • Epicor.Mfg.Common.BOExceptions
  • Epicor.Mfg.Core.BLConnectionPool
  • Epicor.MFG.Core.CallContext
  • Epicor.Mfg.UI.EpiClientLib
  • Epicor.Mfg.Lib.ISessionMod
  • Epicor.Mfg.Lib.SessionMod


And then, for the business objects you want to use, add two references like this:

  • Epicor.Mfg.BO.(business object name)
  • Epcior.Mfg.IF.I(business object name)


Here is some sample code on how you can connect directly to Epicor:

public BOFactory(string company)
{
this.company = company;
string user = "manager";
string password = "manager";

m_cnVantage = new BLConnectionPool(user, password, "AppServerDC://"
+ ConfigurationSettings.AppSettings[m_strKeyVantageServer] + ":"
+ ConfigurationSettings.AppSettings[m_strKeyVantagePort]);
}

public Epicor.Mfg.BO.SalesTer GetSalesTerBO()
{
Epicor.Mfg.BO.SalesTer saleTer = new Epicor.Mfg.BO.SalesTer(m_cnVantage);
return saleTer;
}


And then, once you have your business object:

dataSet = new SalesTerDataSet();
salesTer.GetNewSalesTer(dataSet);
...
salesTer.Update(dataSet);


Also note that you can change the company you working with using this code:

public void SetCompany(string company)
{
this.company = company;
Epicor.Mfg.Lib.SessionMod sessionMod = new Epicor.Mfg.Lib.SessionMod(m_cnVantage);

sessionMod.SetCompany(company,
out companyName, out plantID, out plantName, out workstationID, out workstationDescription,
out employeeID, out countryGroupCode, out countryCode);
}

Thursday, March 17, 2011

Epicor Multi-Company Madness

Now, while I don't consider myself a genius, I feel reasonably intelligent enough to be able to accurately follow a setup installation guide.

However, when installation guide requires that you perform an action on page 75 to successfully get something on page 42 to work, something is seriously wrong.

Specifically, in Epicor's TechRefGuide_MultSite_905602.pdf, it asks you to "Test the Communication" by creating a new customer, marking them Global, save, and then:

"The Multi-Company Process transmits Customer and ShipTo records from that company and sends it to the other companies."

No, it doesn't. Skip to page 75, section "Link Global Records".

What the previous section should have said was:
1. Create the customer, mark as global, save.
2. Goto External Company Maintenance, and choose the child company, and choose Action -> Initialize Multi-Company...
3. Switch to child company, open Customer Maintenance, and choose Action, Link Customer...
4. Search for the customer you created in step once, and click Link.

Hopefully I have saved you the 2 days I wasted troubleshooting this issue.