I am looking for guidance on the best way to remove xrecords from copied entities. My plugin adds a xrecords to a selected entity. If I copy that entity I would like for xrecord to be removed from the newly created entity. I see that a copied event handler could be added to the original entity and that it is fired when that entity is copied, but not sure how to get the objectid of the new entity. Or, perhaps I should just monitor the working database for added entities and remove xrecords of the type I added if they exist. Or, maybe someone has clever, eloquent approach.
Thanks Robert