DataverseCEOperaions 1.0.0

dotnet add package DataverseCEOperaions --version 1.0.0
                    
NuGet\Install-Package DataverseCEOperaions -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DataverseCEOperaions" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DataverseCEOperaions" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="DataverseCEOperaions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DataverseCEOperaions --version 1.0.0
                    
#r "nuget: DataverseCEOperaions, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=DataverseCEOperaions&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=DataverseCEOperaions&version=1.0.0
                    
Install as a Cake Tool

Dynamics 365 CE Operations

A powerful helper library for performing common operations in Microsoft Dynamics 365 Customer Engagement (CE). This package simplifies tasks like querying records, retrieving metadata, managing security roles, handling CRUD operations, and more — all with minimal boilerplate code.

🔧 How to Use This Extension

1. Add the Namespace

using OS.DynCrm.Methods;

2. Build a QueryExpression

var query = QueryExpressionExtension.BuildQueryExpression(
    "contact",
    new ColumnSet(true)
);

3. Execute the Query

var results = QueryExpressionExtension.RetrieveMultiData(query, _context);

Where:

  • query is your QueryExpression
  • _context is your IOrganizationService instance

📘 Example Usages

✅ Build and Retrieve Data Example

QueryExpression query = QueryExpressionExtension.BuildQueryExpression(
    "contact",
    new ColumnSet("firstname"),
    LogicalOperator.And,
    new List<ConditionExpression>
    {
        new ConditionExpression("lastname", ConditionOperator.Equal, "John")
    });

var results = QueryExpressionExtension.RetrieveMultiData(query, _context);

✅ Retrieve Single Record Example

var contact = RetrieveExtension.RetrieveSingle(
    "contact",
    new Guid(id),
    new ColumnSet("firstname"),
    _context
);

return contact.GetAttributeValue<string>("firstname");

🚀 Core Operations Available

🔴 Delete a Record

OperationsExtension.DeleteRecord(
    "contact",
    new Guid("52560db6-e144-409f-aa36-c031134b4724"),
    _context
);

🔍 Detect Duplicates

bool isExist = OperationsExtension.DetectDuplicate(
    "contact",
    "mobilephone",
    "00971569658849",
    _context
);

🛡 Get All Security Roles

List<SecurityModel> roles = OperationsExtension.GetAllSecurityRole(_context);

Each role is returned as a SecurityModel object.

🔗 Connect to Dynamics 365 / Dataverse

var _service = OperationsExtension.Connect(
    organizationUri,
    clientId,
    clientSecret
);

📩 Contact

For inquiries or support, feel free to reach out:

Email: ossama.abbdallah@outlook.com

Product Compatible and additional computed target framework versions.
.NET Framework net471 is compatible.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 71 5/24/2025