Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Plugin Methods

Posted on by 2,909

Hi all,

Might sound stupid however I can't workout how to call / invoke a method in the plugins when using the Developer tool kit.

Normally we would create an object of the class and then call the method i.e.

Program p = new Program();

p.someMethod();

If I have something like below how can I call "taskcreate"?

namespace Test.Plugins
{

       public class PostOperationmsdyn_customerassetUpdate: PluginBase
         {

               protected override void ExecuteCrmPlugin(LocalPluginContext localContext)
              {

          // code

                call taskcreate(..........)
            }
           public void taskCreate(IOrganizationService _service, string liistate, string type, Guid liiguid)
          {
             // code
         }
   
}

*This post is locked for comments

  • antc Profile Picture
    antc 2,909 on at
    RE: Plugin Methods

    Cheers Guys!

    That's what I was doing but had a null due to a field typo.

    Forgot to step into and was stepping over with the debugger don't code enough these days!

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Plugin Methods

    Hi Antc,

    if you solved the problem thanks to an answer, please mark it as verified to encourage the community to provide more and more a better support. Thank you. Francesco

    If you found the answer helpful, please mark as Verified 

    Join my network on LinkedIn      Follow me on Twitter 

    Thank You & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna, ITALY

    Independent Contractor

    http://www.francescopicchi.com

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Plugin Methods

    Hi Antc,

    simply call:

    taskCreate(theService, "my liistate", "my type", new Guid("...");

    Please let us know.

    If you found the answer helpful, please mark as Verified 

    Join my network on LinkedIn      Follow me on Twitter 

    Thank You & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna, ITALY

    Independent Contractor

    http://www.francescopicchi.com

  • Verified answer
    Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: Plugin Methods

    Hi,

    You just need to use method name and pass required parameters for example above method should be called as:

    taskCreate(parameters.....);

    Thanks

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans