This code throws an error when the entity is "interactionforemail"
var entityLogicalName = "interactionforemail"; QueryExpression query = new QueryExpression { EntityName = entityLogicalName, ColumnSet = new ColumnSet(false) }; // This line throws error, only when entity is "interactionforemail": var records = myOrganizationServiceProxy.RetrieveMultiple(query);
The error thrown is :
No proper condition to retrieve interactions
System.ServiceModel.FaultException`1
HResult=0x80131501
Message=No proper condition to retrieve interactions
Source=mscorlib
StackTrace:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.Xrm.Sdk.IOrganizationService.RetrieveMultiple(QueryBase query)
at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.RetrieveMultipleCore(QueryBase query)
at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.RetrieveMultiple(QueryBase query)
at DynamicsCRMPOC.AoDynamicsEntity.GetTopEntities(String entityLogicalName, Int32 top, ColumnSet columnSet) in C:\Users\nilay.vishwakarma\Source\Repos\DynamicsCRMPOC\DynamicsCRMPOC\DynamicsService.cs:line 330
*This post is locked for comments