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)

JavaScript – Scroll to Top

In a scenario where we need to scroll to the top of a web page, we can use JavaScript’s scrollTo. Consider the scenario where there is a page filled with text, and the scroll bar appears. With a scroll button at the bottom: We can add the following code to set the window to it’s x/y coordinates: window.scrollTo(0,0); Full code: When clicking the button, the page will scroll to the … Continue reading JavaScript – Scroll to Top

Web Resources Manager in XrmToolBox

The Web Resources Manager is a 3rd party XrmToolBox plugin from MsCrmTools 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, … Continue reading Web Resources Manager in XrmToolBox

XrmToolBox Metadata Browser

The XrmToolBox Metadata Browser is an XrmToolBox plugin tool from MsCrmTools 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 … Continue reading XrmToolBox Metadata Browser

XrmToolBox Metadata Document Generator

The Metadata Document Generator is a 3rd party XrmToolBox plugin from MsCrmTools 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#

Term is Not Recognized in PowerShell

In PowerShell, you may encounter the error “The term is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.” Let’s look at how to fix this. In the example below, I have a function called Add2, which adds 2 numbers: The code: $num1 = … Continue reading Term is Not Recognized in PowerShell

PowerShell Loop Through Array

In this post, we will look at how to loop through an array in PowerShell. We can define our array as: $myArray = “one”, “two”, “three” And loop through it like below: foreach ($arr in $myArray) { Write-Output $arr } Running this, we get:  

PowerShell If Statements

PowerShell If statements need to be written in a particular syntax. Let’s look at some examples below. Equals In the example below, we test for equals. Note the notations -eq: $a = 1 $b = 2 If ($a -eq $b) { Write-Output “Equal” } Else { Write-Output “Not Equal” } Greater Than In the example below, we test for equals. Note the notations -gt: $a = 1 $b = 2 … Continue reading PowerShell If Statements

JavaScript Async / Await

In some previous posts, we looked at using callbacks and promises. In this post, we will look at Await / Async in JavaScript. Await / Async is built on promises, and is a clean way to represent asynchronous processes in a synchronous way. For example, consider the code below. We have 2 functions, DoSomethingAsync and DoSomethingElseAsync.  The first function will complete in 2 seconds, and the second function in 1 second: [sourcecode … Continue reading JavaScript Async / Await