Tuesday, March 29, 2016

Email Tracking Office 365 and Dynamics CRM

This post demonstrates how quickly you can configure the CRM app to track emails between Office 365 and Dynamics CRM.  The only precondition is that the users mailbox must configured for server side synch. From the Settings menu select the Apps for Dynamics option.



Click the Dynamics CRM App for Outlook. The installation of the app will run in the background.


Wednesday, March 23, 2016

Web API - Querying with Expand

From version 2016 onwards the Web Api in Dynamics CRM should be the preferred choice for new development as the old rest services are being deprecated. Something I noticed when I started to use the Web Api endpoint is that support for $expand is limited when retrieving multiple records.

The Expand option is used to retrieve related entity data as part of a request uri and for Web Api requests it only works when querying a single record. So for example using the old rest services you could query the accounts entity and use the expand option to also return the email address of the primary contact as follows

//XRMServices/2011/OrganizationData.svc/AccountSet?$select=Name,account_primary_contact/EMailAddress1& $expand=account_primary_contact

If you try and do the same query using the Web Api you will get the error "The navigation properties are not supported with $select clause"

//api/data/v8.0/accounts()?$select=accountnumber,name&$expand=primarycontactid($select=emailaddress1)

Friday, March 11, 2016

Default security role in Dynamics CRM

Many smaller organizations that use Dynamics CRM have simple security requirements. This is typically a single business unit with a small number of security roles. Usually every user has a default security role that can view and update records with a few power users or managers having additional rights on top of this. When you add a new user to CRM you have to assign them a security role before they can login to CRM.

As you may be aware there is a team for every business unit including the root business unit and when you add a new user it automatically becomes a member of this team. So by applying a security role to the root business unit team every user will have this role. In the example below I copied an existing security role and renamed it as the "Default Security Role". I then applied this security role to the root business unit team so it will be applied to every user.

Now when you add a new user you no longer need to give them a security role as they will automatically get the default security role. The only thing you need to careful of is that you set the security roles at business unit level as a minimum. Setting them at user level will not work.