Dear All,
We want to implement a plugin for advanced find to identify who have downloaded records, how many records and for which entity. I have implemented the below code in order to achieve this and it is working perfectly except that I cannot retrieve how many records.
Please let me know how to achieve this. I want to know many records the user downloaded using advanced find.
ParameterCollection collection = context.InputParameters;
if (current.Request.Path.Contains("/_grid/print/") && context.MessageName == "RetrieveMultiple" && collection["Query"] is QueryExpression)
{
QueryExpression expression = (QueryExpression)collection["Query"];
DateTime datetime = DateTime.Now.AddDays(0);
Entity entity = new Entity("new_exportlog");
entity.Attributes["new_name"] = expression.EntityName + " exported on " + datetime;
entity.Attributes["new_entityexported"] = expression.EntityName;
entity.Attributes["new_dateexported"] = datetime;
entity.Attributes["new_username"] = new EntityReference("systemuser", context.InitiatingUserId);
entity.Attributes["new_noofrecordsexported"] =???
}
Thanks in advance.
Ravi
Ravikumar