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
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
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!
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)
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?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,235 Most Valuable Professional
nmaenpaa 101,156