Accessing and Manipulating Data in Dataverse with the XRM Client

Accessing and Manipulating Data in Dataverse with the XRM Client Using the XRM client, you can perform CRUD (Create, Read, Update, Delete) operations and retrieve related data in Microsoft Dataverse. This guide walks you through these tasks step-by-step. Setup Ensure the following packages are installed: Install-Package Microsoft.CrmSdk.XrmTooling.CoreAssembly Install-Package Microsoft.CrmSdk.XrmTooling.CrmWebApi Connect to Dataverse Establish a connection to your Dataverse environment: using Microsoft.Xrm.Tooling.Connector; using Microsoft.Xrm.Sdk; var connectionString = "AuthType=OAuth;Username=YOUR_USERNAME;Password=YOUR_PASSWORD;Url=https://YOUR_ORG.crm.dynamics.com;AppId=YOUR_APP_ID;RedirectUri=YOUR_REDIRECT_URI;"; var service = new CrmServiceClient(connectionString); 1. Read (Retrieve) Operation Retrieve an entity record by its ID: ...

March 15, 2025 · 3 min · Taner

Performing CRUD Operations and Joining Tables with IOrganizationService

Performing CRUD Operations and Joining Tables with IOrganizationService When working with Microsoft Dataverse, IOrganizationService is a powerful API that enables direct interaction with the Dataverse environment. This guide demonstrates how to perform CRUD operations and retrieve related records using the OrganizationService in an ASP.NET Core application. Setup Before starting, ensure the required packages are installed: Install-Package Microsoft.CrmSdk.CoreAssemblies Install-Package Microsoft.CrmSdk.XrmTooling.CoreAssembly Connect to Dataverse Establish a connection to your Dataverse environment using a connection string: ...

March 15, 2025 · 2 min · Taner

Understanding FetchXML: Breaking Down a Query Example

Understanding FetchXML: Breaking Down a Query Example FetchXML is a powerful XML-based query language for retrieving data from Microsoft Dataverse. Let’s break down a sample FetchXML query and understand its components. FetchXML Query <fetch> <entity name='contact'> <attribute name='fullname' /> <attribute name='emailaddress1' /> <link-entity name='account' from='accountid' to='parentcustomerid' alias='account'> <filter> <condition attribute='accountid' operator='eq' value='ACCOUNT_ID' /> </filter> </link-entity> </entity> </fetch> Explanation of Components <fetch>: The root element of the query, containing the definition of what data to retrieve. <entity>: Defines the primary entity for the query. In this example: ...

March 15, 2025 · 2 min · Taner