Microsoft Dynamics CRM

IE 11+ – Event.Mode Issues – Unsupported – Mode is null

Posted by dynamicsnick on June 18, 2015
Microsoft Dynamics CRM / Comments Off on IE 11+ – Event.Mode Issues – Unsupported – Mode is null

If you still happen to be using the event.mode option on your forms in CRM it is now officially deprecated with the latest release of IE11. You will receive a strange and mysterious error that looks states that Mode is null.

The resolution is to use the supported CrmContext.getEventArgs().getSaveMode() instead of event.mode in our JS libraries or page code

and here is how it might look in a simple code example for the onsave event for the account object: If a user attempts to deactivate an account.

function HandleOnSaveAccount(CRMContext) {

if (CRMContext.getEventArgs().getSaveMode() == 5)


alert(“You should not deactivate this account. Please contact the administrator first.”);



For this to work there are 2 things that need to happen in your event handler. You need to define a name for the CRM context object in this case it is called CRMContext, but it can be named anything. The other is that on the entity in CRM you must specify on the save event to pass the “context as first parameter” option and this will populate the function with the session context that you can use the context in your JS code.


This solution is compatible with IE 11 +  and older browsers as well.


Tags: ,

Understanding Business Units in CRM

Posted by dynamicsnick on May 15, 2015
Microsoft Dynamics CRM / Comments Off on Understanding Business Units in CRM

In CRM you have the ability to create what are called business units. Now when you install Microsoft Dynamics CRM you will get a primary business unit created by default and typically it is the name of your company. This is known as the primary business unit and is the parent or root business unit in Microsoft Dynamics CRM.

You must note that the parent business unit cannot be deleted, deactivated or changed. It can be renamed, and that is pretty much it. However, you can group and build other business units that are called child business units off of the root business unit. Much like an hierarchical structure.

Business units and security roles literally go hand in hand. They allow you to separate various levels of access to specified groups in your organization. Users are assigned to business units and security can be restricted to records that are in that business unit group.

For example you could have a structure with a primary business unit and also a child business unit for sales, a child business unit for service, and a  lastly a child business unit for Marketing.

This would allow you to use the entities even custom ones in CRM that have been created, but only have access to records created in your business unit. If you had a merger or recent acquisition you could also use a business unit to provide a level of separation in your dataset to different groups of users and that might be another case depending on your example that child business units would come in handy.



Microsoft Dynamics CRM 2015 Roadmap

Posted by dynamicsnick on April 17, 2015
Microsoft Dynamics CRM / No Comments