Sample: Quick start for XRM Tooling API

Note

Unsure about entity vs. table? See Developers: Understand terminology in Microsoft Dataverse.

The QuickStart sample is a .NET Framework managed code sample that shows how to connect to a Microsoft Dataverse instance by using the XRM Tooling APIs, and perform basic create, update, retrieve, and delete operations on a table. For more information about XRM Tooling, see Build windows client applications using the XRM tools.

Download the sample: Work with XRM Tooling API

How to run the sample

  1. Download and extract the sample so that you have a copy locally.
  2. Open the Quick start for XRM Tooling\C#\QuickStartXRMToolingWPFClient.sln file in Visual Studio.
  3. Press F5 to compile and run the program.

Demonstrates

  • The sample code is built using the WPF Application for CRM SDK template that provides a common login control with built-in support for authentication and credential caching and reuse. For more information about the common login control and how to use the SDK template in Visual Studio, see Use the XRM Tooling common login control.
  • No helper code is used to establish a connection to Dataverse.
  • After connecting to Dataverse, the sample performs basic create, update, retrieve, and delete operations on an account table.
  • Stores user credentials in a configuration file (Default_QuickStartXRMToolingWPFClient.exe.config) in the c:\Users\<username>\AppData\Roaming\Microsoft\QuickStartXRMToolingWPFClient folder when the sample is run for the first time, and thereafter prompts the user to either use the stored or specify new credentials at runtime to sign in to Dataverse.
  • Generates the following log files, if any issue occurs, to aid troubleshooting:
  • Login_ErrorLog.log: To report sign-in errors. This file is available at C:\Users\<username>\AppData\Roaming\Microsoft\QuickStartXRMToolingWPFClient.
  • QuickStartXRMToolingWPFClient.log: To report operational errors. This file is available at the same location as the executable, that is in the debug folder of your Visual Studio project.

See also

Use the XRM Tooling common login control
Build Windows client applications using the XRM tools