web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Plugins and developpment strategy

(0) ShareShare
ReportReport
Posted on by

Hello Guys,

My question is regarding plugins developpment.

I cannot figurate out if the organizationservice is deprecated for plugin developments.

Shall we continue to uses C# classes provided within the SDK DLLs or not ?

Is it recommanded to use in plugin the Web Api endpoint or can we still use the traditional classes included in the SDK ? Knowing that the plugin base class and Iplugin interface are coming from the SDK.

And also, do we have an idea if all existing C# code using SDK DLL will be supported in the future?

My question is maybe silly but I really cannot manage to understand at what point we concerning that.

Thanks for your feedback

Emmanuel

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Michel van den Brink Profile Picture
    4,697 on at
    RE: Plugins and developpment strategy

    Hello Emmanuel,

    It is recommended that you use the IPlugin interface and the internal OrganizationService provided via the SDK .

    When a plug-in runs internally in the Dynamics 365 sandbox, it doesn't need to use the WebApi because that would introduce some unnecessary round tripping, it has direct access to the internal OrganizationService.

    IOrganizationServiceFactory serviceFactory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
    IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);

    As seen in this example: https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/sample-create-basic-plugin 

    More docs on creating plug-ins (which you probably already have seen):

    https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/plugin-development 

    https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/write-plugin-extend-business-processes

      

    The SDK libraries are all available via NuGet and the Dynamics 365 (CRM) team is comitted to keep these up-to-date and will support them for the upcoming versions.

    https://www.nuget.org/packages/Microsoft.CrmSdk.CoreAssemblies/ 

      

    The WebApi is primarily targeted at interacting with Dynamics 365 (CRM) from outside in a lightweight manner. The previous SOAP endpoint was very cumbersome for developers outside of the Microsoft ecosystem, as well as way to complex for use in Javascript. The new WebApi makes this a lot easier by being a RESTful API built on OData so developers in any language or ecosystem can easily use it.

  • Emmanuel Barache Profile Picture
    on at
    RE: Plugins and developpment strategy

    Hi Michel,

    Thanks for your feeback.

    That perfectly answers my question.

    I am perfectly aware about how develop plugin using Dynamics SDK.

    The fact is that it seems that the OrganizationService endpoint is supposed to be deprecated and I confess that it confuses me.

    Thanks a lot

    Emmanuel

  • Verified answer
    Michel van den Brink Profile Picture
    4,697 on at
    RE: Plugins and developpment strategy

    Hello Emmanuel,

    The OrganizationService ndpoint is deprecated yes but, the IOrganizationService interface itself isn't.

    The trick is: with dependency injection Dynamics will automatically give you the latest and greatest implementation of the internal OrganizationService, which uses the best internal process available to query data.

    The implementation is abstracted away from us by Microsoft, see it as a nice wrapper implementation around what ever API we are supposed to use, which automatically updates with product updates, to always use the best endpoint.

  • Emmanuel Barache Profile Picture
    on at
    RE: Plugins and developpment strategy

    Thanks Michel,

    That clarifies a lot for me.

    All the best

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans