I'm faced with the daunting task of adding "on change" events to hundreds of fields, a large amount of which require passing the execution context. I know that this is the way to add an "on change" event to a particular field:
Xrm.Page.data.entity.attributes.get('particularfield').addOnChange(functiontorun);
But I cannot seem to find a way to also pass any information from the control that calls the event without going through CRM and manually adding it via the web interface. Is there a Javascript-only solution for this? I tried traversing arguments[0]
but found that arguments[0].getContext.getName() is always equal to "". I've search all over and haven't found an answer to this yet.
We are using CRM 2011 UR11.