Send a Dynamics 365 Email using C#

We will go through an example of sending an email in Dynamics 365 using C#. We have a contact in Dynamics 365 called Bob Smith. We will send the email to him. First, create a new console app: Using NuGet, add references and then the using statements: using Microsoft.Xrm.Tooling.Connector; using Microsoft.Xrm.Sdk; using Microsoft.Crm.Sdk.Messages; using Microsoft.Xrm.Sdk.Query; Now add the code. We will first get the current user using WhoAmIResponse.  Then, we will … Continue reading Send a Dynamics 365 Email using C#

Deploying a Plugin Across Different Dynamics 365 Environments

A common scenario with plugins is they will be developed in one environment, then tested in another environment and then deployed to production for use. Here we will show how to deploy the plugins across different environments. Let’s say we have a plugin that updates the description of an opportunity when it is created that we want to deploy from a dev environment to a QA/test environment. First we will … Continue reading Deploying a Plugin Across Different Dynamics 365 Environments

Checking IsDirty in Dynamics 365 using JavaScript

In Dynamics 365, a user may change field values on a form. A common development requirement is to determine if the form is in a “dirty” state. Here we will go through an example of how to check for this using Xrm.Page. We will check if any fields on the account record have changed. We will run our check by pressing a Submit button in the toolbar, before and after … Continue reading Checking IsDirty in Dynamics 365 using JavaScript

Dynamics 365 Developer Guide (the new SDK)

The Dynamics 365 Customer Engagement Developer Guide is an online guide from Microsoft that is the new format of what was previously the Dynamics 365 SDK. To access the Developer Guide, go to: https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/developer-guide From here, you can download tools using Nuget and PowerShell that were previously part of the SDK download. These include: Code Generation Tool Configuration Migration Tool Package Deployer Plug-in Registration Tool Solution Packager Tool To download the … Continue reading Dynamics 365 Developer Guide (the new SDK)

Web Resources Manager in XrmToolBox

The Web Resources Manager is a 3rd party XrmToolBox plugin that is useful for managing web resources in Dynamics 365. To use it, open the XrmToolbox and select Web Resources Manager: You will see: Select Load Web Resources: Select the resources to load: Resources will load. Note the hierarchy of resources is displayed in a tree structure: Selecting a resource will display it: Note the option for beautifying, compressing and … Continue reading Web Resources Manager in XrmToolBox

XrmToolBox Metadata Browser

The XrmToolBox Metadata Browser is an XrmToolBox plugin tool that allows you to browse metadata in the Dynamics 365 application. To use it, open XrmToolBox and select Metadata Browser: Opening the tool will display several attributes of an entity: You can add and remove these columns by selecting Columns. Selecting an entity will display it’s details: And attributes: As well as: Keys Relationships Privileges The source code is located at: … Continue reading XrmToolBox Metadata Browser

XrmToolBox Metadata Document Generator

The Metadata Document Generator is a 3rd party XrmToolBox plugin that is useful for exporting metadata from Dynamics 365. To use it, open the XrmToolbox and select Matadata Document Generator: You will see: Click Retrieve Entities and Languages: Note the document export options: Excel Workbook Word Document Note if you select Word Document you will see: Select an entity and click Generate document. Your document will be generated:  

Dynamics 365 – Get Entity Metadata using C#

In Dynamics 365, we can retrieve metadata from the platform through code. In this example, we will get information regarding an entity and its attributes. First, create a new C# console app. Add assemblies: Microsoft.Xrm.Sdk; Microsoft.Xrm.Tooling.Connector; Now, add the Using statements: using Microsoft.Xrm.Tooling.Connector; using Microsoft.Xrm.Sdk; using Microsoft.Xrm.Sdk.Messages; using Microsoft.Xrm.Sdk.Metadata; We will first connect to Dynamics 365 to get the IOrganizationService: var connectionString = @”AuthType = Office365; Url = https://yourcrm.crm.dynamics.com/;Username=yourusername;Password=yourpassword”; CrmServiceClient … Continue reading Dynamics 365 – Get Entity Metadata using C#

Downgrading a Dynamics 365 Version

To downgrade a Dynamics 365 version, first log into https://portal.office.com and go to the Dynamics 365 Admin Center: Select your environment and click Edit. Set the environment to Sandbox mode. Next, click on Reset: Select the target version to reset to: Click Reset: Click Yes to Reset: Go back to the Admin Center home page. You will see the instance is being set up and the state is “preparing instance”: … Continue reading Downgrading a Dynamics 365 Version

Creating a North52 Process Genie

North52 Process Genies are useful for extending Dynamics 365 processes such as workflows, dialogs and actions. In Dynamics 365, select Settings->BPA Home: Select Process Genie: Let’s say we want to build a process that will update every account with the number of opportunities they have. The opportunity count will be stored in a new custom field on the account record. To do this, select Account and click Create: This opens … Continue reading Creating a North52 Process Genie