Announcements
No record found.
Hi,
We have a number of users access to Export to Excel from Dynamics and I would like to see who, when and what exported from Dynamics, but I can't seem to see that in the Audit Logs. Any suggestions how to monitor that?
Thanks
Hello,
This information is not logged anywhere so in order to accomplish your goal you have 2 ways out:
1. Develop a plugin that will handle RetrieveMultiple message, check parent context message and if it was called from "Export" message - log that event somewhere (for example to custom entity).
2. Override standard Export button to store that information somewhere and call the standard export function.
Please check my sample code. It refers to Andrew's first idea.
using Microsoft.Xrm.Sdk; using System; namespace MEA.Plugins { public class PreOperationExportToExcel : IPlugin { public void Execute(IServiceProvider serviceProvider) { IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext)); ITracingService tracingService = (ITracingService)serviceProvider.GetService(typeof(ITracingService)); IOrganizationServiceFactory factory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory)); IOrganizationService service = factory.CreateOrganizationService(context.UserId); var parentContext = context.ParentContext; if (parentContext != null && (parentContext.MessageName == "ExportToExcel" || parentContext.MessageName == "ExportDynamicToExcel")) { Entity user = service.Retrieve("systemuser", context.UserId, new Microsoft.Xrm.Sdk.Query.ColumnSet("firstname", "lastname")); String userName = user.GetAttributeValue("firstname") " " user.GetAttributeValue("lastname"); OrganizationRequest actionRequest = new OrganizationRequest("mea_ActionSendEmailOnExportToExcel"); actionRequest["UserName"] = userName; actionRequest["Entity"] = context.PrimaryEntityName; OrganizationResponse response = service.Execute(actionRequest); } } } }
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.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 174
ManoVerse 54 Super User 2026 Season 1
Niki Patel 42