Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum

Dynamics 365, plugins and custom entities and debugging

Posted on by Microsoft Employee

I developed plugins a very long time ago for CRM 3 and 4. But I have not been doing CRM since then.

I am trying to create a plugin that gets the data I need from a create or update along with custom entities for a contact. Then to post this to a webapi.

We hooks is not an option as it does not send me all the data I need including an external id.

How does one obtain and figure out the custom entity attached to a contact and its properies?

Also, what is the best way to debug plugins that is hosted in the cloud? We are not using azure functions  

  • Suggested answer
    Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: Dynamics 365, plugins and custom entities and debugging

    Hi,

    As suggested, how you will get your entity and it's attribute depends on which message your plugin is registered, as you said you want to run your plugin on create/update, you can use post create and post update plugin where you can have images registered, as in the target you will only get dirty fields so in case you want to get all the field you need to use plugin images, You can refer this post community.dynamics.com/.../pre-image-and-post-image-in-dynamics-crm for understanding images in plugin,

    For debugging plugin you can refer quick steps here: http://himbap.com/blog/?p=2469

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Dynamics 365, plugins and custom entities and debugging

    Hi,

    For debugging you can refer the below blog-

    dynamics365blocks.wordpress.com/.../how-to-debug-a-plugin-in-dynamics-365-online-using-plugin-profiler

    To get the entity data in plugin, refer the sample codes below. Basically, for most of the plugin messages, the entity exists in the target property. Which contains the entity reference for the associated entities. So from target you fetch the related entity and then another call to retrieve the full details of related entity.

    docs.microsoft.com/.../sample-create-basic-plugin

    docs.microsoft.com/.../plugin-development

    crmbook.powerobjects.com/.../developing-a-plug-in

    Hope this helps.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans