Use the Organization Service sample and helper code

Applies to Dynamics 365 for Customer Engagement apps version 9.x

Most managed code samples provided in the Dynamics 365 Customer Engagement Web Services that use the organization and discovery web services are using shared helper code to perform common tasks. You might find this helper code useful in applications that you write. This sample code is available as a NuGet package: Microsoft.CrmSdk.Samples.HelperCode-CS

When writing an application that uses the .NET SDK assemblies, you typically have to perform a number of steps to configure your application’s project. To learn more about setting up a project in Visual Studio, or other development environment, see Start a managed code project in Visual Studio.

To view a sample application that uses the helper code and includes the required .NET references, see Run a simple program using Customer Engagement web services.

A non-customized early-bound types file that is named MyOrganizationCrmSdkTypes is included in the Microsoft.CrmSdk.Samples.HelperCode-CS NuGet package to help get you started. However, if your organization has custom or customized entities, you should generate a new early-bound types file. For the purposes of this documentation, the generated classes are included in the global namespace. For more information, see Create Early Bound Entity Classes with the Code Generation Tool (CrmSvcUtil.exe).

See also

Extend Dynamics 365 Customer Engagement on the server
Best practices for developing with Dynamics 365 Customer Engagement
Helper Code: ServerConnection Class
Helper Code: SystemUserProvider class
Helper Code: Enumerations for Option Sets
Sample code directory for Dynamics 365 Customer Engagement
Assemblies Included in the Dynamics 365 SDK
Use Dynamics 365 Services in Code