Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

CRM Plugin registration multiple event for particular entity

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello all,

I need to register crm plugin for two events like create and delete of a single entity not all entity.

that is possible or not

thanks

akram

*This post is locked for comments

  • Suggested answer
    Alagunellaikumar Profile Picture
    Alagunellaikumar 6,210 on at
    RE: CRM Plugin registration multiple event for particular entity

    If you got solution Could you please mark as verified to close this thread

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: CRM Plugin registration multiple event for particular entity

    Thanks HIMBAP ,

    I solved this issue.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: CRM Plugin registration multiple event for particular entity

    Thanks Alagu nellaikumar.S,

    I have got solution

  • Verified answer
    Alagunellaikumar Profile Picture
    Alagunellaikumar 6,210 on at
    RE: CRM Plugin registration multiple event for particular entity

    Create a new step and configure message  as "create" and primary entity choose particular entity

    Create a another step and configure message  as "delete" and primary entity choose particular entity

    In the plugin code also we have make check as

    The below code check if target or executing entity is other than account will not allow

                   Entity entity = (Entity)context.InputParameters["Target"];

                   // Verify that the target entity represents an account.

                   // If not, this plug-in was not registered correctly.

                   if (entity.LogicalName != "account")

                       return;

    Please refer the below link

    msdn.microsoft.com/.../gg594416.aspx

  • Verified answer
    Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: CRM Plugin registration multiple event for particular entity

    You can register same plugin for multiple events, and need write your plugin code accordingly to execute code based on message name, you can simply check :

    if (context.MessageName == "Create")

              {

    //code for create

    }

    if (context.MessageName == "Delete")

              {

    code for delete

    }

    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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans