What's the event in relationship item type when we user save as function?

オフライン

We  have an item type have one relationship item type, We want to modify the relationship item type's property value when user use the Save As function. 

We have tested that the event onbeforecopy only work in parent item type, doesn't work in relationship item type. Anyone could give me a hint about it?

Parents
  • 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

Reply
  • 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

Children