Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Error "No proper condition to retrieve interactions" thrown when retrieving 'interactionforemail' entity records

Posted on by Microsoft Employee

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

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error "No proper condition to retrieve interactions" thrown when retrieving 'interactionforemail' entity records

    Nilay Vishwakarma Were you able to solve this?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error "No proper condition to retrieve interactions" thrown when retrieving 'interactionforemail' entity records

    >>>>it is possible that the issue is related configuration
    Looks like it

    >>>> I am not aware about the "interactionforemail" entity . Is this system entity ?
    Yes it is
    docs.microsoft.com/.../interactionforemail

  • gdas Profile Picture
    gdas 50,085 on at
    RE: Error "No proper condition to retrieve interactions" thrown when retrieving 'interactionforemail' entity records

    I am not aware about the "interactionforemail" entity . Is this system entity ?

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Error "No proper condition to retrieve interactions" thrown when retrieving 'interactionforemail' entity records

    Hi Nilay,

    I have enabled/ configured embedded intelligence and the code is still working (though I haven't enabled/ configure all the prerequisites). Considering that the same code works for me but not for you, it is possible that the issue is related configuration. It certainly doesn't look like code issue.

    You can cross check the prerequists mentioned in the config docs and see if you have configured it correctly. if this still doesn't work, I would suggest to contact Microsoft support.

    Hope this helps.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error "No proper condition to retrieve interactions" thrown when retrieving 'interactionforemail' entity records

    Yes Goutam,

    With any other entity your as well as my code is working as expected. The issue is with retrieving 'interactionforemail' entity.

  • gdas Profile Picture
    gdas 50,085 on at
    RE: Error "No proper condition to retrieve interactions" thrown when retrieving 'interactionforemail' entity records

    Hi Nilay ,

    Not sure , but can you execute the same code with different entity let say contacts , see you are getting any error or not .

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error "No proper condition to retrieve interactions" thrown when retrieving 'interactionforemail' entity records

    Ravi,

    I think you haven't enabled and configured embedded intelligence (Relationship assistant, Email engagement, Auto capture). Mayber if you do, you will see these issues.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error "No proper condition to retrieve interactions" thrown when retrieving 'interactionforemail' entity records

    This doesn't work for me.

    My CRM version:

    Version 1710 (9.1.0.299) online

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error "No proper condition to retrieve interactions" thrown when retrieving 'interactionforemail' entity records

    Got the same error.

    657443.Capture.PNG

  • gdas Profile Picture
    gdas 50,085 on at
    RE: Error "No proper condition to retrieve interactions" thrown when retrieving 'interactionforemail' entity records

    Hi ,

    Try to put some condition let say some mandatory field lets say name  field and try with this .

                    QueryExpression qe = new QueryExpression();
                    qe.EntityName = "interactionforemail"; 
                    qe.Criteria = new FilterExpression();
                    qe.Criteria.AddCondition("column1", ConditionOperator.NotNull);
                    qe.ColumnSet = new ColumnSet();
                    qe.ColumnSet.AddColumns("Column1", "Column2");
                    var records = myOrganizationServiceProxy.RetrieveMultiple(qe);

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans