Dynamics365CEOperationsMethods 2.2.5

dotnet add package Dynamics365CEOperationsMethods --version 2.2.5
NuGet\Install-Package Dynamics365CEOperationsMethods -Version 2.2.5
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="Dynamics365CEOperationsMethods" Version="2.2.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Dynamics365CEOperationsMethods --version 2.2.5
#r "nuget: Dynamics365CEOperationsMethods, 2.2.5"
#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.
// Install Dynamics365CEOperationsMethods as a Cake Addin
#addin nuget:?package=Dynamics365CEOperationsMethods&version=2.2.5

// Install Dynamics365CEOperationsMethods as a Cake Tool
#tool nuget:?package=Dynamics365CEOperationsMethods&version=2.2.5

Dynamics365CEOperationsMethods

How to use This Extension

  1. First Install it from Nuget Package From Here or write in your Package Manager Console:

NuGet\Install-Package Dynamics365CEOperationsMethods -Version 2.2.4

  1. Second using this namespace: using OS.DynCrm.Methods;
  2. After That you can build your Query Expresion by using this method:
var x = QueryExpressionExtension.BuildQueryExpression("contact", new Microsoft.Xrm.Sdk.Query.ColumnSet(true));
  1. To Execute the Query which you built by using Library, you should run the below: QueryExpressionExtension.RetrieveMultiData(X, connect); Just know that X is your QueryExpression, and Connect variable comming from IOrganizationService
Methods that you can use, for example:
  1. Build Query and Retrieve Example:

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

_context here is the IOrganizationService connection from Dynamics CRM Organization.

  1. Retrieve Single Data Example:
var data = RetrieveExtension.RetrieveSingle("contact",new Guid(id), new ColumnSet("firstname"),_context);
return data.GetAttributeValue<string>("firstname");
New Operations in the Library
  1. DeleteRecord:

To work with this method we should pass entity Name , Record GUID , and the Organiztation Service for Example:

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

2.DetectDuplicate:

To work with this method we should pass entity Name , key which is the attribute name of field, value which is the Value that you need to check if it exist or not (The Unique Identifier), and the Organiztation Service For Example:

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

3.GetAllSecurityRole:

This Methods to get all security roles inside your organizataion with it's business unit, For 1`:

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

You will find the data returned as Model <SecurityModel>

For any inquiry email me at ossama.abbdallah@outlook.com
Product Compatible and additional computed target framework versions.
.NET Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  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
2.2.5 338 11/19/2022
2.2.4 295 11/16/2022

- Add New Features to get some Opertaions by call "OperationsExtension" class