Personalized Community is here!
Quickly customize your community to find the content you seek.
Check out the latest Sales updates!Learn about the key capabilities and features of Dynamics 365 Sales and experience some of the new features.
Download overview guide | Watch Sales video
2021 Release Wave 2Discover the latest updates and new features releasing from October 2021 through March 2022.
2021 release wave 2 plan
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Community | FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
I have custom generic AuditHistoryPlugin that captures field changes and creates HistoryRecords, I want to run this same plugin for many entities and I want to provide the capability to the end user to decide for which entities plugin should run by some UI in dynamics customization entity definition area (not using plugin registration tool). Is it possible to provide this kind of configuration in Dynamics 365?
Any suggestion would be greatly appreciated.
Hi Ashish Moradiya,
One way to achieve this is by creating a configuration entity with fields that represent the entities the AuditHistoryPlugin can run on. Based on the values of the fields, alter the AuditHistoryPlugin so that it runs on certain entities.
I would suggest to move from Plugin to Custom Workflow Activity and then create the workflow as required and call this custom workflow activity. This (executing generic code and on multiple entities) is one of the main reason I personally go for custom workflow activity.
With plugin, it will always require a dev skills to connect to PRT and deploy/ register steps. Workflows can be created by end users as well.
Hope this helps.
Thanks for your suggestion, I want to consider Custom workflow activity for my problem as it is configurable by end user. but I still have few doubts like, can custom workflow triggered automatically when specific fields updates? and how can I access list of updated fields in custom workflow activity? As I wanted to create records in custom log table for each field change. In short I want implement similar things like Actionable Audit - appsource.microsoft.com/.../microsoft_labs.actionableaudit but without plugin, So end user can configure system easily.
Thanks in advance.
Yes, everything which you can do inside plugin is possible with custom workflow activity. So you create CWA and call this CWA from a normal workflow. You then configure this normal workflow to either trigger it on demand or change of any fields.
Inside your CWA, you can get the executing entity id and name. It just that you won't be able to get the information of changed field like you get it in plugins.
Is there some PreImage configuration there in CWA, How can I detect field change if there is no information of field change, I will need information like, which field is changing, old value and new value.
It is there but it is undocumented so unsupported. refer below-
If you need to get the changed fields then you need to use plugin. Use generic code in plugin and then register it on each entity. Or if you want more usability then you can register the plugin step programmatically as well. For this you can have a custom workflow attach it with normal workflow.
Business Applications communities