Microsoft’s Power Couple: Power BI and Microsoft Dynamics

Power BI, Microsoft’s cloud based business intelligence service, is a must-have component for companies running any of the products in the Microsoft Dynamics suite, whether it is CRM, AX, GP, NAV or Project Madeira. As a modern intelligence tool, it enables companies to rapidly get insight into their data and interactively find trends to make informed business decisions. Without BI, companies lack visibility and may be running with the wrong roadmap. Businesses already have basic reporting into their data, such as what last month’s sales were, who … Continue reading Microsoft’s Power Couple: Power BI and Microsoft Dynamics

Dynamics CRM Unified Service Desk Setup

Once USD has been installed (see my earlier post) the next step is to configure it. In Dynamics CRM, you can access the USD setup in Settings->Unified Service Desk: Clicking on Hosted Controls, you can see a list of the out of the box hosted controls: Let’s create a new hosted control. The control will show the start page of Dynamics CRM. Click “New” to create a new hosted control. Give … Continue reading Dynamics CRM Unified Service Desk Setup

Dynamics CRM Generic SQL Error

One way a generic SQL error can occur is when dealing with ConditionOperator in QueryExpression. Consider the following code to get all users who’s first name is Bob:  QueryExpression userquery = new QueryExpression(); userquery.EntityName = “systemuser”; ColumnSet cols = new ColumnSet(); cols.AddColumn(“systemuserid”); userquery.ColumnSet = cols; ConditionExpression ce = new ConditionExpression(); ce.AttributeName = “firstname”; ce.Operator = ConditionOperator.Contains; ce.Values.Add(“Bob”); FilterExpression filter1 = new FilterExpression(); filter1.Conditions.Add(ce); userquery.Criteria.AddFilter(filter1); EntityCollection entColRoles = _orgService.RetrieveMultiple(userquery); if (entColRoles != null && … Continue reading Dynamics CRM Generic SQL Error

Dynamics 365 WhoAmI

In Dynamics 365, once we have the IOrganizationService object, we can retrieve the user id, organization id and the business unit id: CrmServiceClient conn = new CrmServiceClient(new System.Net.NetworkCredential(userid, password, domain),server, port, orgname); IOrganizationService _orgService; _orgService = (IOrganizationService)conn.OrganizationServiceProxy; Guid orgId = ((WhoAmIResponse)_orgService.Execute(new WhoAmIRequest())).OrganizationId; Guid userId = ((WhoAmIResponse)_orgService.Execute(new WhoAmIRequest())).UserId; Guid businessunitId = ((WhoAmIResponse)_orgService.Execute(new WhoAmIRequest())).UserId; Code running:

Dynamcis CRM On Premise Console App

To create a console app that connects to Dynamics CRM 2015, we will use the CrmServiceClient. Create a new Visual Studio project and add the assemblies: Microsoft.Crm.Sdk.Proxy Microsoft.Xrm.Sdk; Microsoft.Xrm.Tooling.Connector In the code, add Using: using Microsoft.Xrm.Tooling.Connector; using Microsoft.Xrm.Sdk; using Microsoft.Crm.Sdk.Messages; using Microsoft.Xrm.Sdk.Query; To connect to CRM, we will use the connection information to pass to CrmServiceClient:   string userid = “Administrator”; string password = “yourpassword”; string domain = “YOURDOMAIN”; string orgname … Continue reading Dynamcis CRM On Premise Console App

Dynamics CRM OData and Web API URLs

To finding the Dynamics CRM OData and Web API URLs for your organization, go to Dynamics CRM and select Settings->Customizations: From there, select Developer Resources. You will then see links to the Web API and the OData Organization Service: Web API URL: https://orgname.api.crm.dynamics.com/api/data/v8.1/ The service URLs: https://orgname.api.crm.dynamics.com/XRMServices/2011/Organization.svc https://orgname.crm.dynamics.com/XRMServices/2011/Organization.svc To get the OData: https://orgname.crm.dynamics.com/XRMServices/2011/OrganizationData.svc/ https://orgname.api.crm.dynamics.com/XRMServices/2011/OrganizationData.svc/  

Dynamics CRM Quick Find Entities

Dynamics CRM has quick find functionality, where you can enter text in the search box and it will search specific entity records in CRM. To change which entities are searched, go to system settings->Select entities for search: Here you can add/remove the entities searched:  

Dynamics 365 Copy Security Role

Security roles can be copied in Dynamics 365. To do this, go to Settings->Security and select a role to copy: Select More Actions->Copy Role: Enter a new role name and click OK: A new role is created with the original permissions:  

Dynamics 365 Form Non-Event Dependencies

In our Dynamics 365 forms, there are measures we can take to ensure fields that are being used by JavaScript are not removed from forms. For example, let’s say we have a function to display the Website URL entered by the user: function displayWebsite() { try { alert(“The website entered is: ” + Xrm.Page.getAttribute(“websiteurl”).getValue();); } catch (e) { alert(e.message); } } Let’s add this displayWebsite function to the form OnLoad … Continue reading Dynamics 365 Form Non-Event Dependencies

Dynamics 365 Subgrids

Subgrids are grids on a form that display records from another entity. We will go through an example of adding subgrids to a form using Accounts as an example. The account form in CRM looks something like the following: Notice there are Contacts and Recent Opportunities subgrids. To add more, we will need to customize the form: Select a place on the form to insert the subgrid: Select Insert->Subgrid: This opens the subgrid … Continue reading Dynamics 365 Subgrids