Forum Discussion
4 Replies
- angelaCatalyst II
Hi tenny,
in which ItemType do you have definied the onBeforeCopy event? In the Parent ItemType or the ItemType of the Related Item? E.g. you want to react on chances in the Part BOM, use your event in the ItemType "Part_BOM" instead of "Part".
- tennyIdeator III
Hi Angelalp,
I definied the onbeforecopy event in related item .For example, I have a item type A and have a relationship A_detail ,
We want to do something in A_detail when user user Save as in Item typa A's main grid.
Thanks.
- angelaCatalyst II
Hi tenny,
ah, my first advice wasn´t correct. onCopy events are just triggered on the items where you apply the “Save As”. Additional onCopy events in the relationships will not be considered. You need a different approach to solve this one:
Example: I use an onAfterCopy Event for solving the following use case: If a Part is copied, some Part properties and the Part Goal relationships shall be reset to zero. For solving this purpose, I added an onAfterCopy server event in Part, that also covers the relationships:
https://gist.github.com/AngelaIp/eadc237ae3369fc90f7002f439c39735
Ciao
Angela
- tennyIdeator III
Hi Angela,
Thanks a lot.