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,...
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

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 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 70

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans