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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

SQL error when fetch entity 'childincidentcount'

(0) ShareShare
ReportReport
Posted on by 5

Hi everyone,

I'm trying to fetch entity 'childincidentcount', and i'm getting this error:

Sql error: Generic SQL error. CRM ErrorCode: -2147204784 Sql ErrorCode: -2146232060 Sql Number: 207

My fetchxml is:

<fetch mapping="logical" page="1" count="300"><entity name="childincidentcount"><all-attributes /></entity></fetch>

Can anyone help me with this one? 

Thanks you!

I have the same question (0)
  • gdas Profile Picture
    50,091 Moderator on at

    May I know how you are executing the fetchXML ?

    Do you have entity named childincidentcount?

  • Manh Hung Nguyen Profile Picture
    5 on at

    Hi Goutam,

    Here is my code:

    var executeFetchReq = new ExecuteFetchRequest { FetchXml = xml };

    var orgSvcExecuteFetchResponse = (ExecuteFetchResponse)_service.Execute(executeFetchReq);

    Yes I have this entity. I also got the metadata of this entity. But when I try to fetch data, it throw the error.

    Note: this entity is not supported 'RetrieveMultiple'.

    Thanks you.

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Please put entity name with publisher name like "new_childentity"

  • Manh Hung Nguyen Profile Picture
    5 on at

    Hi,

    It's not new entity. It's currently existing. So I don't want to rename it.

    And here is the detail of error:

    System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]:  Sql error: Generic SQL error. CRM ErrorCode: -2147204784 Sql ErrorCode: -2146232060 Sql Number: 207 (Fault Detail is equal to Exception details:

    ErrorCode: 0x80044150

    Message:  Sql error: Generic SQL error. CRM ErrorCode: -2147204784 Sql ErrorCode: -2146232060 Sql Number: 207

    TimeStamp: 2020-02-11T08:10:33.9567199Z

    --

    Exception details:

    ErrorCode: 0x80044150

    Message:  Sql error: Generic SQL error. CRM ErrorCode: -2147204784 Sql ErrorCode: -2146232060 Sql Number: 207

    TimeStamp: 2020-02-11T08:10:33.9567199Z

    --

    Exception details:

    ErrorCode: 0x80040216

    Message: Exception output:: System.Data.SqlClient.SqlException (0x80131904): Invalid column name 'Name'.

    Invalid column name 'ImportSequenceNumber'.

    Invalid column name 'OverriddenCreatedOn'.

    Invalid column name 'ChildIncidentCountId'.

    Invalid column name 'TimeZoneRuleVersionNumber'.

    Invalid column name 'UTCConversionTimeZoneCode'.

    Invalid column name 'ChildIncidentCountId'.

      at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

      at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(T...).

    Please note that I use '<all-attributes />' in fetchxml. So I don't know why it throw the error.

    Thanks you

  • Manh Hung Nguyen Profile Picture
    5 on at

    Hi everyone,

    Is there anyone help me please? Or any suggestions.

    Thanks you all.

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    I am not saying to rename the entity ,I believe the entity you mentioned in the fetchXML , you should use the publisher name instead of  only "childincidentcount" , check in the entity information page what is the entity publisher name and put the entity name accordingly. Look here entity name which you need to use as an exampel , I have used "tel_" as publisher name.

    pastedimage1581485049449v1.png

    pastedimage1581485091484v2.png

  • Manh Hung Nguyen Profile Picture
    5 on at

    Hi Goutam,

    I sure i'm using the publisher name of entity 'childincidentcount', because I still able to get metadata of this entity. But I can't get data of this entity. I also find this entity in the entity information page like you, and I didn't find it. It seem to be invisible.

    Thanks!

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 83 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

#3
#ManoVerse Profile Picture

#ManoVerse 40

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans