Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

Query Builder Error on Lookup field

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.

  • MadhanSA Profile Picture
    MadhanSA 115 on at
    RE: Query Builder Error on Lookup field

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

  • Suggested answer
    Naveen Ganeshe Profile Picture
    Naveen Ganeshe 3,393 User Group Leader on at
    RE: Query Builder Error on Lookup field

    Hi there!

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

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

    Hope it will help you

  • Verified answer
    erhan.keskin Profile Picture
    erhan.keskin 2,247 on at
    RE: Query Builder Error on Lookup field

    Hi,

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

    Regards,

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!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans