Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

Applying Custom view filter for lookup view doesn't filter the records instead gives "0x8006088a Resource not found for the segment 'null' " in lookup view.

Posted on by 115

Applying Custom view filter on a lookup doesn't retrieve any records instead shows  "0x8006088a Resource not found for the segment 'null' " in lookup view. 

pastedimage1589990418180v3.png

Code snippet used

CT.EducatedAtEntity.FilterEducationCentre = function () {
try {
var fetchxml = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='true'>" + "<entity name='account'>" + "<attribute name='name'/>" + "<attribute name='accountid'/>" + "<link-entity name'ct_ct_siccode_account' from='accountid' to='accountid' link-type='inner' intersect='true' >" + "<link-entity name='ct_siccode' from='ct_siccodeid' to='ct_siccodeid' >" + "<filter type='and' >" + " <filter type='or' >" + "<condition attribute='ct_number' operator='in' >" + "<value>85100</value>" + "<value>85200</value>" + "<value>85310</value>" + "<value>85320</value>" + "<value>85410</value>" + "<value>85421</value>" + "<value>85422</value>" + "<value>85510</value>" + "<value>85520</value>" + "<value>85530</value>" + "<value>85590</value>" + "<value>85600</value>" + "</condition>" + "</filter>" + "</filter>" + "</link-entity>" + "</link-entity>" + "</entity>" + "</fetch>";
var layoutXml = "<grid name='resultset' object='1' jump='account' select='1' icon='1' preview='2'>" + "<row name='result' id='accountid'>" + "<cell name='name' width='150' />" + "</row>" + "</grid>";
CT.EducatedAtEntity.Constants.formContext.getControl(CT.EducatedAtEntity.Constants.fieldNames.educationCentre).addCustomView("{00000000-0000-0000-0000-000000000001}", "account", "Education Centres", fetchxml, layoutXml, true);

} catch (ex) {
CT.CommonUtility.ErrorHandler(ex);
}

}

Below mentioned FetchXml retrieves the result set in XRMToolBox and the same is used in the code snippet above..

<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct="true" >
<entity name="account" >
<attribute name="name" />
<attribute name="accountid" />
<link-entity name="ct_ct_siccode_account" from="accountid" to="accountid" link-type="inner" intersect="true" >
<link-entity name="ct_siccode" from="ct_siccodeid" to="ct_siccodeid" >
<attribute name="ct_number" />
<filter type="and" >
<filter type="or" >
<condition attribute="ct_number" operator="in" >
<value>85100</value>
<value>85200</value>
<value>85310</value>
<value>85320</value>
<value>85410</value>
<value>85421</value>
<value>85422</value>
<value>85510</value>
<value>85520</value>
<value>85530</value>
<value>85590</value>
<value>85600</value>
</condition>
</filter>
</filter>
</link-entity>
</link-entity>
</entity>
</fetch>

Could you please suggest on how to fix the same..

  • Suggested answer
    RE: Applying Custom view filter for lookup view doesn't filter the records instead gives "0x8006088a Resource not found for the segment 'null' " in lookup view.

    This error may appear if the FetchXML string on the code starts with spaces. So, you can try to delete the blank space(s) at the beginning of the string and see if it works, like below:

    Before:
    var fetchXml = "  <fetch version='1.0' ... </fetch>"

    After:
    var fetchXml = "<fetch version='1.0' ... </fetch>"

    If you are still facing issue then upgrade the Marketing solution to latest version and let us know the results. 

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