Wednesday, March 24, 2010

Epicor 9 Tracing Introduction

Epcior 9 has a debugging feature called Tracing. Because Epicor 9 is based on on a DNA archictecture (distributed internet archictecture), all requests from the Epicor client are first translated into an XML document, and the submitted to the business layer through a web service call. See Introduction to Microsoft DNA for a good explanation of this architecture.

To turn on tracing, in Epcior client, to to Options, Tracing Options...

As a developer, you can see exactly what is being sent. The trace example below was generated when saving an address change for a user:


<tracePacket>
<businessObject>Epicor.Mfg.BO.UserFile</businessObject>
<methodName>Update</methodName>
<returnType>void</returnType>
...
<parameters>
<parameter name='ds' type='Epicor.Mfg.BO.UserFileDataSet' ><UserFileDataSet xmlns="http://www.epicor.com/Mfg/100/BO.UserFile/UserFile">
<UserFile>
<XUserID>neilc</XUserID>
<Name>Neil</Name>
<Address1>123 Raccoon Holow</Address1>
...
</UserFile>
<UserComp>
...
</UserComp>
</UserFileDataSet></parameter>
</parameters>
<paramDataSetChanges>
<paramDataSet name='ds' useDataSetNbr='0' >
<changedValue tableName='UserFile' rowState='Modified' rowNum='0' colName='Address1' ><![CDATA[123 Raccoon Hollow]]></changedValue>
...
</paramDataSet>
</paramDataSetChanges>
</tracePacket>

Because of the common naming convention across Epicor's namespace, I can infer from the Epicor.Mfg.BO.UserFile business object with method Update, that the following things exist:
* a table in the database called "UserFile", whose non-logic fields match parameters in UserFileDataSet
* a web service called UserFileService, with method Update

Tuesday, March 23, 2010

Epicor 9 Development

As a developer new to Epicor 9, I was dismayed at the lack of 3rd party books, online, tutorials, and documentation. This blog, hopefully, will help other Epicor 9 newbies get up to speed more quickly.

My fellow co-workers have supported the ERP in all its forms (Avante,Vantage 8, and now Epicor 9) for many years, and happy zip around the menus. I, on the other hand, struggle with the most basic of tasks.

For example:

When setting up a new user in training database of Epicor 9, I went to:
1. Epicor USA
2. Main Plant
3. System Management
4. Company Maintaenance
5. and finally User to open up the User Account Mainteneance screen.

I entered some details, unchecked Disable Account, and attempted to save.
I got the error message "Cannot enable a user if the user does not have a company assigned.".

Okay, no problem, I'll assign a company!
When to the company tab, go to select a company from the dropdown list, but, uh-oh, it's empty! Clicking the dropdrown arrow does nothing.

At this point, I must swallow my pride, and ask a co-worker for help. Turns out, you have to tell Epicor you want to add a new company, before you are allowed to select a company.

To assign a new company:
1. Once you get the error message, you must "Undo" button in teh toolbar to undo the unchecking of the disable account checkbox.
2. Click the dropdown arrow next to the ubiquitous "New" icon in the toolbar, and select New Company...
3. Then the Company dropdown is populated, and lets you choose a company.
4. Uncheck disable account.
5. Save.

Apparently, this same methodology applied to anytime you are created one to many records in the system (adding companies to a user, line items to an order, etc.)