Retrieving data from Dataverse

Introduction

The post describes several methods for retrieving data from Dataverse.

Retrieving data using C#

Query Expression

Figure 1

FetchXML

Figure 2
Figure 3

LINQ

Note: Early binding is required for this. In this example, there would need to be an early binding file for ‘SystemUser’ (Figure 5)

Figure 4
Figure 5

Retrieving data using JavaScript

Web API

Example 1

Figure 6

Example 2

Figure 7

Figure 8 & 9 represents how Figure 7 can be updated to use a custom helper function setLookupValue()

Figure 8
Figure 9

Example 3

Figure 10