Events for client scripts in Dynamics CRM

Hello everybody,

today I want to share few details about form events in Dynamics CRM.

Here they are:

1. OnLoad

2. OnSave

3. OnChange

4. TabStateChange

5. OnReadyStateChange

One important aspect is to keep in mind that for each event other ISVs can join, and process form data with you. So keep in mind, that it's good idea not to make javascript killing all application. 

Notes about each of them: 

1. OnLoad is something, that you can't affect in any way. 

2. OnSave gives you opportunity to validate user input and cancel saving if it not corresponds to some business logic. Also you can understand what button was initiator of save.

3. OnChange is filed level event. It happens when something was modified in control on the form and control lost a focus. 

4. TabStateChange allows you to make reactions for cases when something happened with tab.

5. It is geared for working with IFrames

No Comments

Add a Comment