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 :
Microsoft Dynamics CRM (Archived)

Facing Error "The entityname attribute is not a valid attribute for link-entity"

(0) ShareShare
ReportReport
Posted on by

I am getting "Facing Error "The entityname attribute is not a valid attribute for link-entity" error with following fetchXML query from Iframe js script.

<fetch mapping="logical" version="1.0">
    <entity name="customeraddress">
        <attribute name="exch_altaddresstype" />
        <attribute name="line1" />
        <attribute name="line2" />
        <attribute name="city" />      
        <link-entity name="customeraddress" alias="ab" from="parentid" to="parentid" link-type="inner">
            <filter>
                <condition entityname="ab" attribute="customeraddressid" operator="eq" value="48d50047-66b1-e611-94cd-005056b33beb" />
            </filter>
        </link-entity>
        <filter>
            <condition attribute="exch_altaddresstype" operator="ne" value="119080000" />
            <condition attribute="stateorprovince" operator="not-null" />
        </filter>
    </entity>
</fetch>


I wonder the same query is working fine on CRM2011 but not in CRM2016. Observed after removing entityname="ab" from filter condition its give me output.

*This post is locked for comments

I have the same question (0)
  • David Jennaway Profile Picture
    14,065 on at

    The entityname attribute is not part of the FetchXml schema. So, the error you get is correct, and you should remove entityname="ab" from the condition.

    The entityname attribute was also not part of the FetchXml schema in CRM 2011. I expect that CRM 2011 ignore any attributes that were not recognised, but in CRM 2016 the validation checks are slightly different

  • Community Member Profile Picture
    on at

    Thanks David for quick response.

    Before raising this question I did some analysis and found following link :

    msdn.microsoft.com/.../dn531006.aspx

    Here for CRM 2016 also they are using entityname = "ab" in sample query.

    Example: Find all leads that have no tasks, using an alias. If entityname attribute is not part of the FetchXml schema so why did they mentioned in msdn example.

    Thanks

  • #ManoVerse Profile Picture
    457 on at

    did you get it resolve in crm 2016 ?

  • ashlega Profile Picture
    34,477 on at

    That attribute can be used on the "top" level of the query - you can define additional conditions per linked entity. However, on a particular linked-entity level it can't be used(or so the error says, at least). There is no reason to use it there, though, at least in the query above.

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans