Trigger Client Method on Relationship Replace

I have a client method defined to be triggered on an OnInsertRow event for the Part BOM relationship type. This method is not triggered when the user performs a Part BOM replace. The most likely reason for this is, when handling the replace Innovator is just doing an update of the Part BOM item.

The Part BOM itemtype definition only allows OnBeforeNew, OnAfterNew, OnNew and OnShowItem client events. But these events are not triggered when doing a Part BOM replace.

Is there any way to trigger a client method when doing a Part BOM replace?

Parents
  • Angelaip

    Thanks for your suggestions. The primary function of the existing OnInsertRow client method is to prohibit adding certain Parts to certain BOMs. Two simple prohibitions are: to not allow any Part to appear twice on any BOM; and not allow any Part to be added to the BOM of a Part with classification = 'Component'. There are many other, more complex, prohibitions.

    As you mentioned there are several possible approaches using Server methods, but they would require the user to do a Save before Innovator would trigger the method. It is more user friendly to notify the user of any problems as they are entered.

    Utilizing a Property event (such as OnEditStart) for the Part BOM itemtype related_id property may possibly be of use.

    For now we have just disabled the Part BOM Replace button.

Reply
  • Angelaip

    Thanks for your suggestions. The primary function of the existing OnInsertRow client method is to prohibit adding certain Parts to certain BOMs. Two simple prohibitions are: to not allow any Part to appear twice on any BOM; and not allow any Part to be added to the BOM of a Part with classification = 'Component'. There are many other, more complex, prohibitions.

    As you mentioned there are several possible approaches using Server methods, but they would require the user to do a Save before Innovator would trigger the method. It is more user friendly to notify the user of any problems as they are entered.

    Utilizing a Property event (such as OnEditStart) for the Part BOM itemtype related_id property may possibly be of use.

    For now we have just disabled the Part BOM Replace button.

Children
No Data