How to Update Epicor Table Externally

Good afternoon mega-minds!

I have a scheduling program that I wrote to keep track of our design department’s tasks. We would like to find a way to tie it in with Epicor, so that when a task is done in the scheduling program it will mark that task complete in Epicor. Here’s the scenario: We have a project in Epicor that has a task for “Site Doc Approved”…

We would like to change the TaskStatus to “C” in the Epicor ProjectTask table to show its complete, but I know we’re not supposed to perform any inserts or updates from outside of Epicor because it bypasses the business logic and can screw things up. So, with that in mind, what other options would we have to perform this procedure? I hope what I said made sense. Thanks for your time and any help you can offer.

First thought, do you have MS Project? There’s an export/import function (which I have never used) that might do the trick.

Second thought, 10.1.600+, use REST to update it.

Third thought, have a C# program update it via the Business Objects.

Mark W.

3 Likes

Like Mark said you can write a custom program or use service connect. Use the WCF Services or REST to update the Task. Just do a Trace in the Client to see what Epicor does and replicate the process in code

2 Likes

All the above but just let me emphasize the obvious - No spinning up ado.net and hacking in rows :slight_smile:

At runtime there are a LOT of caches we use. In the ‘update pipeline’ in ICE we handle the cache refreshes for a module, notify other app servers in a cluster, etc. If you go at the db directly, none of that fires so the app thinks the data is X and db thinks the data is Y and the other app servers in the cluster think the data is Z. Great way to start a timebomb that blows up 5 minutes or 5 days later and everyone pulls out their hair trying to figure out what happened because the db access was done days or hours before.

The other aspect is the usage in calculated columns in local or remote tables. Module developers can ‘tap into’ that pipeline as well and when they see field 1 being changed, they update field 17 in their table. This will not occur with a direct db access and now the application code is corrupt and time bomb is set again to blow up hours or days later (or fiscal year end - that’s always a fun one to do root cause analysis on months later)

5 Likes

I can definitely say fromexperience that modifying the DB tables directly in a BPM can be a nasty experience. We went live with a user exit that caused our invoices to go out of balance randomly. Our users had to recreate them manually.

In working with Epicor support we still had the balancing problem after turning off the BPM so assumed the bug was in the code. Only in working on running the invoice groups multiple times with the BPM turned off did we stop having the error.

I rewrote the BPM to use the “tt” tables and then the update worked and the invoices balanced. This is not an experience I want to have again.

2 Likes