web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Relationship Analytics - msdyn_dailyleadkpiitem error and functionality question

(1) ShareShare
ReportReport
Posted on by 183
My organization recently installed the Relationship Analytics feature and it's been going well for the most part until the following error appeared on the related dailyleadkpiitem tab on Lead:

"Error in retrieve multiple of msdyn_dailyleadkpiitem..Query should have a Equal operator for msdyn_leadid attribute in the condition"

Users can dismiss the message but the view (Daily kpis for lead Associated View) never actually shows anything. The message appears to be related to permissions because logging in as a system admin doesn't show the message at all but we also don't completely understand the point of having that tab for non-system admins. It's also not very clear to me why it would fail since I can find msdyn_leadid populated for Leads where I am checking for the related dailyleadkpiitems. I found two plugins that I'm assuming are what checks and populates the record in the system but I can find no documentation on it. From what I can tell, msdyn_dailyleadkipiitems is a table that's added with Relationship Analytics. It looks like it's the individual records you can access for whatever interactions are recorded on the Relationship Analytics tab of the Lead. What I don't completely understand yet is how the records are created and updated. I'm assuming it's a plugin that's doing that but I can't completely explain the query error:

Plugin: Microsoft.Crm.ActivityAnalysisDailyKpiRetrieveMultipleValidation

System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: Error in retrieve multiple of msdyn_dailyleadkpiitem.Query should have a Equal operator for msdyn_leadid attribute in the condition
at Microsoft.Xrm.RemotePlugin.Grpc.SandboxFabricGrpcClient.ExecutePluginInternal(IRemotePluginRequest pluginRequest, ExecuteRequest executeRequest, Guid executionId, ISandboxFabricDuplexCommunicationHandler communicationHandler, Boolean returnTraceInfo, Guid organizationId, SandboxFabricCallTracker sandboxFabricCallTracker) +0x5d0
at Microsoft.Xrm.RemotePlugin.Grpc.SandboxFabricGrpcClient.ExecutePlugin(IRemotePluginRequest pluginRequest, IPluginExecutionContext executionContext, IPluginTracingService pluginTracingService, ISandboxFabricDuplexCommunicationHandler communicationHandler, ISet`1 earlySerializedPropertiesList, SandboxFabricCallTracker sandboxFabricCallTracker, ISandboxMemoryStreamProvider memoryStreamProvider) +0x2cd
at Microsoft.Xrm.RemotePlugin.Grpc.SandboxFabricCodeUnit.Execute(ILifetimeScope scope, IExecutionContext context, SandboxFabricCallTracker& sandboxFabricCallTracker, ISandboxMemoryStreamProvider memoryStreamProvider) +0x6e
at Castle.Proxies.Invocations.ISandboxFabricCodeUnit_Execute.InvokeMethodOnTarget() +0x13
at Castle.DynamicProxy.AbstractInvocation.Proceed() +0x2d
at Microsoft.Xrm.RemotePlugin.Client.Interceptors.SandboxFabricPluginTraceInterceptor.Intercept(IInvocation invocation, IExecutionContext context, SandboxFabricCallTracker sandboxFabricCallTracker) +0x1f
Categories:
I have the same question (0)
  • Muhammad Shahzad Shafique Profile Picture
    2,336 Most Valuable Professional on at
    Relationship Analytics - msdyn_dailyleadkpiitem error and functionality question
    Non-admin users see an error in the "Daily KPIs for Lead" view because the query lacks a required “msdyn_leadid” filter. 

    Fix: 
    1. Edit the view in Advanced Find and add “msdyn_leadid EQUALS [Current Lead]”. 
    2. Grant non-admins Read access to “msdyn_dailyleadkpiitem” and “msdyn_leadid”. 
    3. Publish changes. 

    Cause: 
    The plugin “Microsoft.Crm.ActivityAnalysisDailyKpiRetrieveMultipleValidation” enforces strict filtering for security. Admins bypass it. 

    The tab shows lead interaction analytics (calls, emails) for sales teams. 


     
  • pdr469 Profile Picture
    183 on at
    Relationship Analytics - msdyn_dailyleadkpiitem error and functionality question
    Hi Muhammad,

    Thanks for your reply! Unfortunately the msdyn_leadid field is a single line of text instead of the lookup so I can't do the filter you suggested unless I'm missing something. Interestingly, the actual lookup is a field called msdyn_entityid, which is the lookup to Lead from Daily Lead KPI Item. I'm wondering if I need to develop a flow or something that will automatically populate that lookup since from what I can tell, it's almost always blank but the msdyn_leadid has the GUID text. I'm assuming a plugin is setting the value of the msdyn_leadid at some point but nothing appears to be actually setting that msdyn_entityid value.

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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 228

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 156 Super User 2025 Season 2

#3
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 149

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans