Dynamics365CEOperationsMethods 2.2.5
dotnet add package Dynamics365CEOperationsMethods --version 2.2.5
NuGet\Install-Package Dynamics365CEOperationsMethods -Version 2.2.5
<PackageReference Include="Dynamics365CEOperationsMethods" Version="2.2.5" />
paket add Dynamics365CEOperationsMethods --version 2.2.5
#r "nuget: Dynamics365CEOperationsMethods, 2.2.5"
// 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
- First Install it from Nuget Package From Here or write in your Package Manager Console:
NuGet\Install-Package Dynamics365CEOperationsMethods -Version 2.2.4
- Second using this namespace:
using OS.DynCrm.Methods;
- After That you can build your Query Expresion by using this method:
var x = QueryExpressionExtension.BuildQueryExpression("contact", new Microsoft.Xrm.Sdk.Query.ColumnSet(true));
- 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 fromIOrganizationService
Methods that you can use, for example:
- 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.
- 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
- DeleteRecord:
To work with this method we should pass
entity Name
,Record GUID
, and theOrganiztation 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 theOrganiztation 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 | Versions 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. |
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.
- Add New Features to get some Opertaions by call "OperationsExtension" class