Friday, October 24, 2014

OnChange part 3: Where is the clearOnChange method?

The Microsoft Dynamics CRM SDK comes with lots of functionality to affect how CRM behaves on the client side.
In a couple of articles I will discuss the opportunities ventilate my frustration over run-time event handling manipulation.

My first article in this series covered problems when trying to remove design-time defined onChange events in run-time using removeOnChange.

The second one covered problems with context awareness after manipulating event handlers using addOnChange.

To sum up the difficulties described in the two previous articles, it would be very useful to be able to say

Ok, I cannot remove the design-time event handlers, and there are some issues with manually added event handlers. So please, remove everything to give me a clean slate!

But there is no method to clear an attribute from all current event handlers.

To be able to remove an event handler, you must know its exact syntax. And you just can't remove event handlers that were introduced design-time.

It seems that introducing addOnChange and removeOnChange had a good intention and was a nice try, but they definitely didn't go all the way.

No comments:

Post a Comment