- Download the solution
- Deploy the solution
Note: This solution does not update any of the system entities.
- Once the solution is deployed, publish all customizations
- In order to configure update notifications for a particular entity form, go to Settings->Customizations->”Customize the system” and open your entity form. For example, let’s take a look at how to enable update notifications for the Account entity
- Open Account form in Dynamics CRM form editor
- Bring up “Form Properties” dialog
- Add “tcs_” scripts to the form (make sure tcs_treecatscripts is the last script in the list of added libraries since it utilizes two other scripts):
- Add “OnLoad” form hanlder to call “GotchaHunter.DynamicsCRM.ClientHelper.CreateHtmlHelper” function, and pass true as a parameter to automatically start watching for record updates.
Before you publish these changes, let’s also EntityWatcher to display a notification every time you change a phone number. To do that, create “onchange” handler for the “Phone” control which will be calling GotchaHunter.DynamicsCRM.ClientHelper.UINotifier.ShowNotification function, and pass a notification message string to that method:
- Apply your changes (click “OK”, then save and publish the form)
At this point, update notifications are installed and configured for the account form(and you might choose a different form if you wanted to).
In order to test update notifications, you will need to ask another user to assist you(or you can login to Dynamics CRM from another computer):
- Open one of the Dynamics CRM accounts.
- Use another machine to update the same account(or ask someone else to do it) – for example, change account number.
- A notification will show up:
- In the notification area, click on the “clear notification” link to remove notification
- To test field change notifications, change account phone number and move control to a different field after that. Another notification will show up: