Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

savedquery With Id Does Not Exist - Add custom view (relationship N:N)

Posted on by Microsoft Employee

Hi All,

I have to add on the Account form subgrid from custom entity. Relationship between Account and custom entity N:N. The records which will be showing in the subgrid lookup have to be chosen by defined filter.

I had searched a solution and found the following:

http://siva0808.blogspot.com/2016/10/crm-2016-update-10-subgrid-inline.html

But when Look Up Records window is displayed I get the error:

4762.Untitled.png

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.Xml.XmlException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #9C2DA6C7Detail: 
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
  <ErrorCode>-2147220970</ErrorCode>
  <ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
  <Message>System.Xml.XmlException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #9C2DA6C7</Message>
  <Timestamp>2017-02-10T08:15:42.2194449Z</Timestamp>
  <ExceptionSource i:nil="true" />
  <InnerFault>
    <ErrorCode>-2147220969</ErrorCode>
    <ErrorDetails xmlns:d3p1="schemas.datacontract.org/.../System.Collections.Generic" />
    <Message>savedquery With Id = 1dfb2b35-b07c-44d1-868d-258deeab88e2 Does Not Exist</Message>
    <Timestamp>2017-02-10T08:15:42.2194449Z</Timestamp>
    <ExceptionSource i:nil="true" />
    <InnerFault i:nil="true" />
    <OriginalException i:nil="true" />
    <TraceText i:nil="true" />
  </InnerFault>
  <OriginalException i:nil="true" />
  <TraceText i:nil="true" />
</OrganizationServiceFault>


What it can be? How I can fix the error?

Thanks in advance.

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: savedquery With Id Does Not Exist - Add custom view (relationship N:N)

    Mohd Saad Akhtar

    Yes!!!! It works!!!

    Than you so much!

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: savedquery With Id Does Not Exist - Add custom view (relationship N:N)

    Use this: You missed + in between cell name

    var layout = "<grid name='resultset' object='10026' jump='aca_name' select='1' icon='1' preview='1'>" +
    
                   "<row name='result' id='aca_resellerid'>" +
    
                   "<cell name='aca_name' width='300' />" +
    
                   "<cell name='createdon' width='100' />" +
    
                   "</row>" +
    
                   "</grid>";



  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: savedquery With Id Does Not Exist - Add custom view (relationship N:N)

    Your view is not getting created. Please share your code for layout. I think your issue is in  this portion of code:

    //fetch to retrieve filtered data

           var fetchXml = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>" +

                "  <entity name='contact'>" +

                "    <attribute name='contact' />" +

                "    <attribute name='createdon' />" +

                "    <filter type='and'>" +

                "      <condition attribute='statecode' operator='eq' value='0' />" +

                "      <condition attribute='account_productid' operator='eq' value='" + LookUp[0].id + "'/>" +

                "    </filter>" +

                "  </entity>" +

                "</fetch>";

           //columns to display in the custom view (make sure to include these in the fetch query)

           var layout = "<grid name='resultset' object='1' jump='contactid' select='1' icon='1' preview='1'>" +

                   "  <row name='result' id='contactid'>" +

                   "    <cell name='contact' width='300' />" +

                   "    <cell name='createdon' width='100' />" +

                   "  </row>" +

                   "</grid>";

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: savedquery With Id Does Not Exist - Add custom view (relationship N:N)

    Yes, I did it....

    var layout = "<grid name='resultset' object='10026' jump='aca_name' select='1' icon='1' preview='1'>" +
                    "  <row name='result' id='aca_resellerid'>" +
                    "    <cell name='aca_name' width='300' />"
                    "    <cell name='createdon' width='100' />"
                    "  </row>" +
                    "</grid>";


    Not helped... :(

  • Suggested answer
    Nithya Gopinath Profile Picture
    Nithya Gopinath 17,074 on at
    RE: savedquery With Id Does Not Exist - Add custom view (relationship N:N)

    Hi Nataly,

    See: community.dynamics.com/.../139436

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: savedquery With Id Does Not Exist - Add custom view (relationship N:N)

    I always clean browser cookies and cache after any changes in JS... Unfortunately, it didn't help.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: savedquery With Id Does Not Exist - Add custom view (relationship N:N)

    When I specify the existing view id - I don't get the error, but I see the standard view, without the necessary filter.

    I have permissions to both entity.

    Also I have checked my fetch in the FetchXml Tester - it works fine.

  • Suggested answer
    Nithya Gopinath Profile Picture
    Nithya Gopinath 17,074 on at
    RE: savedquery With Id Does Not Exist - Add custom view (relationship N:N)

    Hi Nataly,

    Try clearing the browser cookies and cache related to CRM by using Ctrl+F5.

    Hope this helps.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: savedquery With Id Does Not Exist - Add custom view (relationship N:N)

    Do you have read permissions to both Custom and Account Entity. 

    It Looks like your FetchXML is incorrect and view is not getting created. Please share your code.

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans