Is there a Data table that I can use to query what parts have been deleted?

I would like to query deleted parts so that I can remove them from any external programs that relate to our Epicor database. The problem is I can’t find a data table that tells me what parts were deleted and when they were removed from Epicor.

Thanks.

There are many options…

  1. Make a BPM to monitor for DELETE and then write to a UD Table
  2. Make a BPM to monitor for DELETE and write to a .csv (have some other program delete your external part)
  3. Make a BPM to monitor for DELETE and call your external app API to do something…
  4. Use CDC Subscriber Management and subscriber to the DELETE event of Part table (See CDC in Help Files)

… but none of the options @hkeric.wci mentions will tell you what has already been deleted. Out of the box, once a part is deleted it is gone as if it had never existed.

1 Like

What do you mean by deleted parts?

Im having a hard time understanding how you have a large repository of parts deleted out of Epicor, as once a part has been in any sort of a transaction it can’t be deleted.

1 Like

Mostly we delete parts when they’re created in Error. It’s not very consistent, but I want to catch the cases where parts are deleted.

I thought that about the orders being deleted. But there’s a table in Epicor that tells you what orders have been deleted. I was hoping that there was a table like that for parts as well.

This isn’t a bad idea. I like the BPM workaround. I’m still hoping that there’s a table in Epicor that shows the deleted records, but this one might work.

Also, I"m not familiar with CDC Subscriber Management. I’ll have to look into that.

1 Like

Epicor will not let you delete a part UNLESS it is not yet referenced by some other table… for example, once you create a job for the part, you cannot delete it.
That said, this is somewhat self policing…
But there is the possibility that someone could create a part, part revision, BOM, and never reference it elsewhere, and then delete the part. If you are trying to track this, then, NO we dont have a built in way to do this.
I have seen however several companies add BPMs that create a new record into a UD Table every time an entity (like a Part, PO, Sales Order, Job, etc) is deleted. This tracing is basically so that they could look back over time to find out where something went. The BPMs were fairly simple. they simply were triggered when a record was deleted, and captured some data about the deleted record, and who/when the deletion was done.

I think CDC stands for Change Data Capture. It is a tool that I couldn’t wrap my head around (when trying to find a use case for our company), but from what I remember they use it in their framework for epicor social enterprise to raise events and notifications and they exposed it to us (end users) to consume and use in our own customizations.

@hkeric.wci there was a cool webinar on it, do you know if that is floating around anywhere?

Indeed I am not able to detete the part that has reference to other table.
image

I am new to Epicor and wonder how to create a BPM that create a UD Table every time an entity is deleted?

Basically I need something for auditing on traceability.

Once there’s a transaction against the partnumber then it can no longer be deleted. You would need to go to part maintenance and check the inactive checkbox to prevent the part from being used going forward.

Thanks Steven for the prompt response.

Actually I also want to create an alert either via email or the UD table that track the deletion for a table that yet to have a transaction.

You could create a BPM on the Deletion of a record from the part table. But I think that might require some custom C# in the method directive (BPM setup) in order to write to a UD table.

Hi Steven,

The challenge I have is that I don’t know which method to use for deletion.
Example, if I want to track who delete the Vendor.

In the Vendor business object, there are many methods and I tried a few of them and it doesn’t seem to work.

Likely it would be update or updateext. You can run a tracelog and create / delete a vendor in your PILOT environment. Then on the tracelog record it should show the business object and method used for the vendor deletion.

If you’re trying to make a BPM you can do a data directive and create a condition that triggers the BPM with the condition that ‘There is at least one Deleted row in the ttVendor table’. Then you can Execute custom code that will write to the UD table at the moment the vendor is deleted.

Even DeleteByID() usually ends up calling Update().

You just add a new BPM on Update that triggers whenever Rowmod == “D”

You can also use a data directive. For parts, both method and data directives are going to be pretty much identical.

1 Like

Thanks Steven.

I managed to get it work using the update as per say.

Thanks John,
I did try to use RowMod == “D” but without success.
Maybe I am missing out something.

However I managed to use “There is at least one deleted row in the xxx table” working.