This one can be quite interesting, the possibility of interacting with data from a plugin trough the Javascript, for now, i'm not seeing any example, but definitively is one to have a look, and what i think is quite interesting is regarding with getSharedVariable and setSharedVariable.
When you associate a function in a JavaScript library to an event handler in Microsoft Dynamics CRM, you can check the Pass execution context as first parameter option. The following table lists the execution context object methods.
| Method | Description |
|---|---|
Returns the Xrm.Page.context object. See Client-side context (client-side reference) for more information. | |
Returns a value indicating the order in which this handler is executed. | |
Returns a reference to the object that the event occurred on. | |
Retrieves a variable set using setSharedVariable . | |
Sets the value of a variable that can be used by a hander after the current handler finishes. |
Use the getEventSource method in functions to make them more generic. For example, if you have a function that formats a telephone number, you can use the getEventSource method to refer to whatever attribute caused the onChange event. Your functions do not need to reference a specific attribute.
Hope it gives you new ideas to extend even more CRM.