Save Custom Form Data on CUI Save Button Click

How do we extend the CUI save button click event. I need to save data in a relationship custom form. I tried using the below function
aras.registerEventHandler('ItemSave', window, saveFunction);
However, the "saveFunction" is triggered even after i move out of the window to other forms.
Parents Reply Children
No Data