i read the following:
You can add functions to the OnChange attribute, form OnSave, and lookup control PreSearchevents at run time by using Xrm.Page.data.entity attribute.6881e99b-45e4-4552-8355-2eef296f2cd8#BKMK_addOnChange, the Xrm.Page.data.entity.fbaf2e7a-db2f-448f-bd24-6b3ca1ccb28e#BKMK_addOnSave, and the lookup control 51828fe3-f6ff-4f97-80ed-b06b3a354955#BKMK_addPreSearch methods. When these methods are used, the function is added at the bottom of the event handler pipeline and they receive the execution context as the first parameter. You can use the corresponding 6881e99b-45e4-4552-8355-2eef296f2cd8#BKMK_removeOnChange,fbaf2e7a-db2f-448f-bd24-6b3ca1ccb28e#BKMK_removeOnSave and 51828fe3-f6ff-4f97-80ed-b06b3a354955#BKMK_removePreSearch methods to remove functions added this way.
I don't get, how to attach to page events?
Whats this: Xrm.Page.data.entity.fbaf2e7a-db2f-448f-bd24-6b3ca1ccb28e#BKMK_addOnSave ???
i like to attach to the OnLoad event, may I use window.onload?