Dynamics 365 Using EntityReference to Get Name from Id

When connecting to Dynamics 365 from code, you can retrieve records of an entity through RetrieveMultiple. When using RetrieveMultiple, you specify the columns you would like to retrieve using a ColumnSet. Either specify the columns like this: ColumnSet columnSet = new ColumnSet(“name”, “opportunityid”, “parentaccountid”); Or retrieve all columns like this: ColumnSet columnSet = new ColumnSet(true); In some cases, the columns retrieved will be an Id. For example, when retrieving Opportunities, … Continue reading Dynamics 365 Using EntityReference to Get Name from Id

Dynamics CRM Retrieve Multiple and Query Expression

Query Expression is a class used to build queries in Dynamics CRM. Let’s go through some examples of how to use this. Here are some of our records in CRM: If we want to return the Alexis Fry contact, we can use the RetrieveMultiple method to do this. It will retrieve all records where the contact name is Alexis Fry, in this case one record. Note if you know the GUID … Continue reading Dynamics CRM Retrieve Multiple and Query Expression

Connecting to Dynamics 365 using the Organization Service Proxy

We will connect to Dynamics 365 from a console app using the Organization Service Proxy. To do this, create a new console app. Add the assemblies: Microsoft.Xrm.Sdk System.ServiceModel (for ClientCredentials) We will also add Microsoft.Crm.Sdk.Proxy to get the version info from Dynamics 365. Add using statements: using Microsoft.Xrm.Sdk.Client; using System.ServiceModel.Description; using Microsoft.Crm.Sdk.Messages; Now the code to connect to Dynamics 365: using System; using System.Linq; using Microsoft.Xrm.Sdk.Client; using System.ServiceModel.Description; using Microsoft.Crm.Sdk.Messages; namespace … Continue reading Connecting to Dynamics 365 using the Organization Service Proxy

Useful Dynamics CRM and Dynamics 365 Links and Blogs

Below are some links that may be useful: Dynamics CRM Forums at Microsoft Web API Entity Reference at Microsoft Dynamics 365 Team Blog Blogs Hosk’s Dynamics CRM Blog Salim Adamon XrmToolBox Tanguy Touzard WOODSWORKBLOG Zsolt Zombik develop1 Scott Durow Rajeev Pentyala Gustaf’s Blog Jason Lattimer Deepesh Somani David Yack Neil Parkhurst Surviving CRM CRM Musings Work and Study Book James OConner Andrii Butenko CRM Tip of the Day Jonas Rapp, GitHub … Continue reading Useful Dynamics CRM and Dynamics 365 Links and Blogs

Dynamics 365 Power Apps Workflows vs Plugins vs Actions

In Dynamics 365 and Power Apps, Workflows, Plugins and Actions are used to automate business processes.They allow businesses to hook onto events that occur in the system. Here we will look at the differences between the two and when to use which one. Let’s summarize with the table below: Type Triggers Synchronous and/or Asynchronous Tool Workflow Create, Fields Change, Status Change, Record Assigned and Deleted Asynchronous (background) or Synchronous (real-time) Process … Continue reading Dynamics 365 Power Apps Workflows vs Plugins vs Actions

Dynamics 365 Get Id of Current Record with JavaScript

To get the Id of the current record: var id = Xrm.Page.data.entity.getId(); To get the entity name: var entityName = Xrm.Page.data.entity.getEntityName(); For more information see the Microsoft website: https://msdn.microsoft.com/en-us/library/gg334720.aspx  

Web Resource Project with Dynamics 365 Developer Extensions (3rd Party)

Using the Developer Extensions 3rd Party project for Dynamics 365, you can set up a Web Resource project to help you deploy web resources to your Dynamics 365 environment. To do this, first make sure you have installed the developer extensions for Visual Studio. Next, create a new CRM Web Resource project: This will create the project below: Next, right click to create a new JavaScript file: Enter a name … Continue reading Web Resource Project with Dynamics 365 Developer Extensions (3rd Party)

Uploading Data to Dynamics CRM Online

Dynamics CRM Online has a way to perform a manual upload data to the system. This is useful if you have data in an excel spreadsheet, for example, and you need that data in CRM. This method to upload data is used ad-hoc and is different from more complex real-time integrations. Here I have a CSV file with accounts I want to upload to CRM. Note the upload format needs to be CSV, … Continue reading Uploading Data to Dynamics CRM Online

Update Record in Dynamics 365 using jQuery

To update a record using jQuery, use the following code. You will need to pass the GUID of the record you are updating as well as the type of entity. This example updates an account record name: function updateAccount() { var context = Xrm.Page.context; var serverUrl = context.getClientUrl(); var guid = Xrm.Page.data.entity.getId(); var endpoint = “/XRMServices/2011/OrganizationData.svc”; var account = new Object(); var collection = “/AccountSet”; account.Name = “New Updated Name”; var … Continue reading Update Record in Dynamics 365 using jQuery

Dynamics 365 Attach a Note to a Record with C#

To attach a note to to an entity using C#, use the code below. The note entity is “annotation”. For example, you could attach a note to a case (incident): This would create a note below on the case: