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

How to Search Notes in Dynamics 365 using Relevance Search

In this post, we will look at how to use the Relevance Search in Dynamics 365 to search through Notes. Let’s say we have a note on an Account in the Timeline like below: Open up the solution and select Configure Relevance Search: Select the Note entity and click Add: You may need to wait some time for the change to work. Now, go to relevance search by selecting the … Continue reading How to Search Notes in Dynamics 365 using Relevance Search

USD – MoveApplicationToPanel Action

In Unified Service Desk, the MoveApplicationToPanel action allows you to move a hosted control to a particular panel. For example, here we have a hosted control called contact, in the MainPanel: If we want to move this to the RightPanel, we can call in the Debugger: This moves: And the LeftPanelFill:  

ERP Writers Awards 2017 Best Independent Blog Shortlist

At the beginning of 2017, I decided to spend as much time as possible sharing as much information as I could. No nugget of knowledge would be too small, with the hope that someone out there would one day find it useful. The year finished on a nice note, when this site was shortlisted for the ERP Writers Awards from ERP Focus in the category of Best Independent Blog. You can … Continue reading ERP Writers Awards 2017 Best Independent Blog Shortlist

Understanding WPF Namespaces

Here we will look at how Windows Presentation Foundation (WPF) uses Namespaces. Let’s start a new WPF project: We can see here there are XML namespaces defined: xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation” xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml” xmlns:d=”http://schemas.microsoft.com/expression/blend/2008″ xmlns:mc=”http://schemas.openxmlformats.org/markup-compatibility/2006″ WPF uses XML Namespaces, as defined by the W3C. Namespaces are used to prevent conflicts from occurring, to distinguish code from developers. To solve problems where two developers may use the same elements in their code, namespaces and prefixes … Continue reading Understanding WPF Namespaces