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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Query Builder Error on Lookup field

(0) ShareShare
ReportReport
Posted on by 115

Hi,

I have a contact lookup field in accounts and I have added a javascript for custom filtering. I am getting '0x80041103 Query Builder Error' while clicking on the lookup.

My fetchXML looks like : 

var fetchXML="<link-entity name='ct_contactrole' from='ct_contact' to='contactid' link-type='inner' alias='ab'><filter type='and'><condition attribute='ct_account' operator='eq' value='{RecordID}' /></filter></link-entity>";

I am getting the expected contacts through advanced find though. Let me know what am I missing here.

Thanks in advance.

I have the same question (0)
  • Verified answer
    erhan.keskin Profile Picture
    2,253 on at

    Hi,

    I assume you use "addPreSearch" for this FetchXML. However, as you use Link Entity, then you should use "addCustomView" instead.

    Regards,

  • Suggested answer
    Naveen Ganeshe Profile Picture
    3,397 User Group Leader on at

    Hi there!

    Please see these links: anubhavbajpai.wordpress.com/.../

    community.dynamics.com/.../fetchxml-linked-entity-with-lookup-filter

    Hope it will help you

  • MadhanSA Profile Picture
    115 on at

    Thanks Erhan. I have used addCustomView and it worked!!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

#2
ManoVerse Profile Picture

ManoVerse 55 Super User 2026 Season 1

#3
11manish Profile Picture

11manish 37

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans