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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

one plugin for different entities

(0) ShareShare
ReportReport
Posted on by 2,510

Hi, usually, we select specific entity to create plugin, is there anyway to create a plugin for different entities? Thanks

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    There are bunch of generic plugins and the great example is AutoNumbering plugin. It can work for any target entity. Do you have any specific question?

  • Verified answer
    ashlega Profile Picture
    34,477 on at

    Technically, plugins are not associated with entities till you register a message processing step. If you are using a plugin registration tool, for example, you can register any plugin for any entity (whether it will work or not depend on how you write code for that plugin, of course)

  • Inogic Profile Picture
    715 on at

    You can create a generic (common) plugin which can be registered for different entities for any messages. It will work if you are working on same named fields throughout. But suppose you need to use different fields based on entity names or based on it any other business logic needs to be implemented then you may use the context.PrimaryEntityName = “specific entity logical name” and split the logic. When context is the object of IPluginExecutionContext.

    Hope this helps to implement your logic in the plugin.

    If this answered your question, please make sure to Mark this as an Answer.

    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

Responsible AI policies

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

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans