maybe somebody know a solution for this use case.
I use a Method in the ItemType 'Part BOM' that is triggered by an onAfterAdd and onAfterDelete event. The Method updates an integer property that indicates how often the corresponding child part is used at all. This one is helpful to highlight 'preferred' Parts that are more often used than others.
So each time when an user adds or deletes an Item in a BOM, the counter recalculates how often the child part is used by counting the number of related source parts.
So far everything works perfect! There is only one usecase that crashes everything. When users copy the parent part (the most used way to add new items...), my calculation Methods in ItemType 'Part BOM' aren´t triggered! The onAfterAdd and onAfterDelete Methods are not called and so my counter property will not be updated.
I tried all kind of server events available in my child relationship ItemType, but none reacts when copying the parent.
What options do I have? It might be possible to use an onAfterCopy Method in the Parent ItemType that updates all child parts, but that´s much code for a small requirement. I wonder why my onAfterAdd child event is not triggered, because when I copy something, the child item has to be added.
Or is there some way to explicit trigger the child events with the onAfterCopy parent event?
Any help appriciated!