Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How can I call a plugin which inherits from IPlugin wihout JS

(0) ShareShare
ReportReport
Posted on by

I encountered the following code which solves my problem but I do not know how to call it in the Dynamics 365 system. I registered it using Plugin Deployer. However, I cannot see it in the steps section.

 public class ReadAnnotation : IPlugin
 {
 public void Execute(IServiceProvider serviceProvider)
 {
 IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));
 IOrganizationServiceFactory serviceFactory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
 IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);
 ...
}
}

*This post is locked for comments

  • Suggested answer
    Rajesh Chungath Profile Picture
    467 on at
    RE: How can I call a plugin which inherits from IPlugin wihout JS

    Plugins will not available as workflow steps. Please create a workflow code activity and register it using plugin registration tool. Then you can use it on workflow steps.

  • Suggested answer
    Sreevalli Profile Picture
    3,256 on at
    RE: How can I call a plugin which inherits from IPlugin wihout JS

    Hi,

    You cannot use a plugin in workflows, we need to create workflow activity by inheriting "CodeActivity". see the sample workflow code - docs.microsoft.com/.../sample-create-custom-workflow-activity

    after that register your workflow same as plugin then you must be able to see the step under your arm workflow.

  • Community Member Profile Picture
    on at
    RE: How can I call a plugin which inherits from IPlugin wihout JS

    I already did. Something else must be the problem.

  • Suggested answer
    Swetha Poojary Salaskar Profile Picture
    326 on at
    RE: How can I call a plugin which inherits from IPlugin wihout JS

    HI

    Did you added strong name key to your plugin project? if not then please add it.

    Refer steps below:

    1.In Solution Explorer, open the shortcut menu for the project, and then choose Properties.

    2.Choose the Signing tab.

    3.Select the Sign the assembly box.

    4.In the Choose a strong name key file box, choose <Browse…>, and then navigate to the key file. To create a new key file, choose <New…> and enter its name in the Create Strong Name Key dialog box.

    Reference URL:

    https://docs.microsoft.com/en-us/dotnet/framework/app-domains/how-to-sign-an-assembly-with-a-strong-name

    Thanks,

    Swetha

    If found useful, please mark the answer as verified

  • Community Member Profile Picture
    on at
    RE: How can I call a plugin which inherits from IPlugin wihout JS

    I registered the plugin using the plugin registration tool. However, in the tool it is written that I registered a plugin not a workflow activity. And when I create a workflow in the CRM I cannot seem to find the plugin in the steps.

  • gdas Profile Picture
    50,091 Moderator on at
    RE: How can I call a plugin which inherits from IPlugin wihout JS

    Can you please tell me what you are trying to achieve with the plugin. Did you register your plugin using plugin registration tool? If not then you should register your plugin first in which event (messages like create , update etc ) you want to register your plugin -

    docs.microsoft.com/.../tutorial-write-plug-in

    Once you register your plugin you need to trigger the same  event  , let say create record or update record using javascript , your plugin will automatically trigger.

  • Community Member Profile Picture
    on at
    RE: How can I call a plugin which inherits from IPlugin wihout JS

    I should add that in the Plugin Deployer the plugin is named (Plugin) Name - Isolatable whereas other plugins that we develop are named (Workflow activity) Name - Isolatable.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans