Sample: Quick start for XRM Tooling API
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
- Download and extract the sample so that you have a copy locally.
- Open the
Quick start for XRM Tooling\C#\QuickStartXRMToolingWPFClient.slnfile in Visual Studio.
- Press F5 to compile and run the program.
- 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
\AppData\Roaming\Microsoft\QuickStartXRMToolingWPFClientfolder 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
- 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.