Sunday, January 18, 2015

Maintaining Team Membership in Private Queues with a Plugin

The Spring 2014 release of Dynamics CRM introduced private queues prior to this all queues were public and visible to all users. Now you can control which users can see a private queue by adding them as members of that queue. When adding members to a queue you have the option to add a team in which case the team members are added as members of the queue.  The problem is that any subsequent changes in the teams membership are not reflected in the queues membership.

Setting Field Visibility when the Business Process Stage Changes

In Dynamics 2015 we can now hook into the OnStageChange event which gets fired when the stage of a business process flow changes. We do this by adding an event handler to the OnStageChange event when the form loads. In this example when the form loads it calls the AddStageHandlers function so that the StageChangedHandler function gets called when the stage changes.

Dynamics CRM Form

When the StageChangedHandler function runs it checks if the opportunity is at the "Close" stage. If the stage is Close then the header field estimated value field is disabled so that the Estimated Revenue cannot changed. It also hides the purchase timeframe field.


  1. function AddStageHandlers() {
  2.     Xrm.Page.data.process.addOnStageChange(StageChangedHandler);
  3. }
  4.  
  5. function StageChangedHandler() {
  6.     var activeStage = Xrm.Page.data.process.getActiveStage();
  7.     var stageName = activeStage.getName();
  8.     if (stageName == "Close") {
  9.         Xrm.Page.ui.controls.get("purchasetimeframe").setVisible(false);
  10.         Xrm.Page.ui.controls.get("header_estimatedvalue").setDisabled(true);
  11.     }
  12. }

Dynamics CRM Opportunity



Sunday, January 04, 2015

CRM Queue with a Office 365 Shared Mailbox

If you use Office 365 then the best option for CRM email queues is to use a shared mailbox as they don't consume a license and there is no charge if they don't exceed 5gb in size. Below is an example of the steps required to create a support email address and the associated queue in Dynamics CRM.

In the Office 365 admin portal select the new option under shared mailboxes and enter your desired email address with at least one member. Note: You must enter a member against the mail box otherwise it will not be provisioned.  You can remove the member once it's working.