Using Latebound Constants Generator

The Latebound Constants Generator is a tool by Jonas Rapp to generate constant classes for late bound Dynamics 365 development. To use it, open the XrmToolBox and install “Latebound Constants Generator”: This will install: Select the link, you will see below. Click Load entities: This will load the entities and selected entity attributes: Note the ability to filter entities by Solution, whether to show system or customized entities, managed or unmanaged, … Continue reading Using Latebound Constants Generator

Installing Sample Data in Dynamics 365

To install sample data in Dynamics 365, go to Settings->Data Management: Select Sample Data: Click Install Sample Data: You will see the message “Installation of sample data is processed in the background. You can continue to use Microsoft Dynamics 365”: Close the dialog. Click to open it again. You will see the message when complete, “Sample data is installed on the system”. Note the option to Remove Sample Data: Sample … Continue reading Installing Sample Data in Dynamics 365

Enable and Disable Turbo Forms and Legacy Forms in Dynamics 365

In Dynamics 365, there are Legacy Forms and Turbo Forms. Turbo forms are a new form rendering option that was built to provide better performance. The only difference to end users is that forms will load faster. However, developers will need to ensure their original legacy forms load properly as turbo forms. You can read more about the changes here on the Microsoft Dynamics 365 CE blog. The option to … Continue reading Enable and Disable Turbo Forms and Legacy Forms in Dynamics 365

Dynamics 365 Calling Update in SDK.REST Invokes Retrieve

In this post we will look at how calling the update method in SDK.REST causes a retrieve to run as well. This is something to note as you may have plugins that run on the retrieve of an entity, which may cause unintended consequences if not handled properly. Let’s create a plugin that will run on the Update of an account: Add the plugin assemblies through NuGet: And the code. … Continue reading Dynamics 365 Calling Update in SDK.REST Invokes Retrieve

View Dynamics 365 Metadata Through URL

To view the Dynamics 365 metadata through a URL, go to the Settings->Customizations and select Developer Resources: Copy the Service Root URL: Paste this into a browser and add $metadata to the URL, so it should be: https://yourorg.api.crm.dynamics.com/api/data/v9.1/$metadata You will see the metadata for this organization:  

Filtering Lookups in Dynamics 365 with addCustomFilter and addPreSearch

In Dynamics 365, we have the ability to filter lookups using addCustomFilter. To do this, we get the control we would like to filter, and add use: addCustomFilter(filter, entityLogicaName) Where: filter is a FetchXML string entityLogicaName is an optional parameter that implies the filter should only work for the entity provided Let’s say on opportunities all accounts are displayed: If we would like to filter these accounts to only show … Continue reading Filtering Lookups in Dynamics 365 with addCustomFilter and addPreSearch

Dynamics 365 Timeout Settings

In Dynamics 365, we have the ability to configure timeout settings. Navigate to Settings->Administration->System Settings. You will see: Set session timeout Set inactivity timeout For Set session timeout, you can see there is a maximum session length, defaulting to 1,440 minutes (i.e. 24 hours). The minimum session length is 60 minutes. And, how long before the session expires do you want to show the timeout warning, defaulting to 20 minutes. For … Continue reading Dynamics 365 Timeout Settings

Turning Off Dynamics 365 Error Report

In Dynamics 365, you may come across the error message below when using the application: “Microsoft Dynamics 365 has encountered an error. Please tell Microsoft about this problem. Microsoft Dynamics 365 has created an error report that you can send to help us improve the product. Microsoft respects the privacy of your personal information” You can turn this message off for users. To do this, go to Dynamics 365 Settings->Administration and … Continue reading Turning Off Dynamics 365 Error Report

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