0
devinedon created
Hi there,
What is the best approach to enable tracking on a dynamic properties itself? We are already using dynamic properties and finding it very effective however we would love some history changes along with who modified it (UserID).
Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)
2 Answer(s)
-
0
Hi devinedon, As far as I know, the relevant functions are not currently implemented. You can try to retrieve Entity History, or rewrite
IDynamicEntityPropertyValueManagerand add auditing when setting the value logic.public class CustomValueManager : DynamicEntityPropertyValueManager { public CustomValueManager(IDynamicPropertyPermissionChecker dynamicPropertyPermissionChecker, IDynamicPropertyManager dynamicPropertyManager, IDynamicEntityPropertyManager dynamicEntityPropertyManager) : base(dynamicPropertyPermissionChecker, dynamicPropertyManager, dynamicEntityPropertyManager) { } public override void Update(DynamicEntityPropertyValue dynamicEntityPropertyValue) { // Your audit code. base.Update(dynamicEntityPropertyValue); } }Module Code:
public class YourAnyModule : AbpModule { public override void PreInitialize() { Configuration.ReplaceService<IDynamicEntityPropertyValueManager, CustomValueManager>(DependencyLifeStyle.Transient); } }Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Great thanks! This makes sense. Will get going with this ASAP
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)