Thursday, April 28, 2011

Service Connect Workflow Designer XML Mapper Shortcut

The following tip can save you a lot of time in the XML Mapping tool, which is part of Epicor's Service Connect Workflow Designer.

When designing a workflow for Service Connect, some of the business object datasets are very wide (a large number of elements). Service Connect's only option for modifying data is to use a Conversion workflow item, which applies an XSLT to the data.

Even if you want to only modify a single value, you are forced to map all other values using XML Mapper, to avoid data being lost. With wide datasets, dragging a connection between each element is laborious.

In the Conversion example below, I only want to update the Name element (using a literal), but want to keep all other values the same.




To automatically map elements to their previous values, hold down Ctrl key while dragging then connection between the parent ComplexType elements, then all child elements are automatically mapped. This can be a real time saver.

The help document explains it as:

"When mapping complex fields of multiple occurrence, the Mapper will not copy child elements automatically unless you hold the Ctrl button while dragging the linking line. You may also force the Mapper to copy all child fields by setting the Deep Copy flag in the Link Properties."

A word of caution however. There is not quick way to unmap the child elements. If you change your mind, you will have to manually select and delete each connection.

Tuesday, April 19, 2011

Epicor 905.602A "Invalid user ID or password."

We have been struggling awhile with the "Invalid user ID or password." issue with Epicor 905.602A.

Every one to two weeks, Epicor refuses to let us log in. The log files show nothing, and Management Console shows the app server running fine. However, if you stop and restart the app server, the problem goes away. Connecting using WCF instead of the Epicor Client returns the same error message.

On our last support call, Epicor Technical support has a possible solution. They believe the issue is with OpenEdge, not Epicor itself. We are running 64-bit OpenEdge on Windows.

To attempt to fix this issue, we are applying HotFix 21 (rl102ASP0321hf-64.EXE), available for download from the Epicor support site (you need an account to login). Because the problem occurs intermittently, I won't know for sure if the fix will work, but it is nice to have a course of action. Here's hoping.

Friday, April 15, 2011

Epicor Customizations and Menu Management

After you create a form customization for Epicor, you may want to set that customization as the default for all your users.

To do this, you use System Management > Utilities > Menu Maintanence to assign your customization to a menu item.

However, many menu items open the same form, and if you want the users to always use your customization, no matter which menu item they select, you manually find and change each menu item.

It is very easy to miss a menu item, and the users will not understand why the customizations does not appear.

I wrote a custom application, called Epicor Menu Manager, which uses Epicor's Web Services (using WCF) to make it easier to manage customizations.

It lets you:

  • search for menu items by name, program, or arguments
  • find all menu items which are eligible, but not currently linked to a customization
  • suggest and update customizations for a menu item


Here's what it looks like:


Above, I have asked to see all menu items eligible for my Sales Region customization. In the tree navigation, it hightlights the path to the found menu items.

I think this application might be userful for others. If you would like to buy a copy, please contact Summa-Tech.

Monday, April 11, 2011

Epicor 9 and User Defined Codes

When customizing Epicor 9, you might find you require additional fields for a given table.

For example, we have a client who organizes sales regions into sales districts. So, on the Sales Region Maintenance screen, we want the user to be able to select a district.

BEFORE


AFTER



You can customize the form, by adding a TextBox for SalesRegion.Character01 field, but it is better to have the user select from a range of choices.

Previously to accomplish this, you would have to add the sales districts into a user-defined table, and then add a combo box which populates from that table.

The easier way is to use something called User Defined Codes Maintenance.

Step 1 - Define User Codes

Located under System Management -> Utilities -> User Codes, open the "User Defined Codes Maintenance screen".

Create a Code Type, and then assign values (Code, and Code Description). In my case, I created a Code Type called "District", and added 4 codes, with descriptions "Northern District", "Southern District", etc. Each code also has a shorter Code ID.

Step 2 - Associate Field with User Code
Located under System Management -> Utilities -> Extended Properties, open the Extended Properties Maintenance screen.

In my case, I want to associate the district codes with the sales region:

  1. Selected "Region" DataSet Table ID
  2. Selected Fields tab, and selected the Character01 field from the tree view
  3. for the UD Code Type: field, chose "District" from combo box.


Now the system knows that Region.Character01 is associated with User Defined Codes "District".

Step 3 - Form Customization
Now I need to add to the Sales Region form a combo box for the Character01 field.


  1. Turn on Developer Mode (Main Menu -> Options -> Developer MOde)
  2. Open Sales Region
  3. Start Customization (Tools -> Customization)
  4. From Toolbox, add a EpiCombo control to the form
  5. Change the EpiBinding property to Region.Character01


As soon as I select Region.Character01 for the EpiBinding property, the system automatically filled in for me the EpiCombo properties.




And that's it. Now your users can choose from a pre-defined list of values for a user defined field.

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.

Friday, June 25, 2010

Business Activity Query Designer

Business Activity Query Designer is availabe in Epicor under:
System Management > Utilities

It is used to create queries in Progress ADL, which can be used is dashboards, or to export data using Business Activity Query Export Process (located in same path). Business Activity Query Export Process can export a file in .csv or .xml, either as a one time process, or on a schedule.

Unfortunately, as a data export tool, ADL lacks many functions in SQL. For instance, I wanted to return only distinct rows from a table, but there is no equivalent of "SELECT DISTINCT".