<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic OData ServiceRequestServiceReferenceObjectCollection filter by InstallationPointID doesn't work in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/odata-servicerequestservicereferenceobjectcollection-filter-by/m-p/12582508#M2009370</link>
    <description>&lt;P&gt;This oData query to ServiceRequestServiceReferenceObjectCollection:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;&lt;A href="https://my.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/ServiceRequestServiceReferenceObjectCollection?$filter=SerialID" target="test_blank"&gt;https://my.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/ServiceRequestServiceReferenceObjectCollection?$filter=SerialID&lt;/A&gt; eq 'SERIALID'&amp;amp;$select=ObjectID,InstallationPointID&amp;amp;$format=json&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt; gives me two entities:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;{
    "d": {
        "results": [
            {
                "ObjectID": "025B31541C561EDD8AA312A531497E8C",
                "InstallationPointID": "4047"
            },
            {
                "ObjectID": "06A84A6744FC1EDD8BEB170B54B85066",
                "InstallationPointID": "4047"
            }
        ]
    }
}&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;So, this query should work: (filter by InstallationPointID eq '4047')&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;&lt;A href="https://my.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/ServiceRequestServiceReferenceObjectCollection?$filter=InstallationPointID" target="test_blank"&gt;https://my.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/ServiceRequestServiceReferenceObjectCollection?$filter=InstallationPointID&lt;/A&gt; eq '4047'&amp;amp;$select=ObjectID,Inst
allationPointID&amp;amp;$format=json&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;but it doesn't, I get response with code 200 and empty results:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;{
    "d": {
        "results": []
    }
}&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;This entity field is marked as filterable in $metadata:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;&amp;lt;EntityType Name="ServiceRequestServiceReferenceObject" c4c:parent-entity-type="ServiceRequest"&amp;gt;
	&amp;lt;Key&amp;gt;
		&amp;lt;PropertyRef Name="ObjectID"/&amp;gt;
	&amp;lt;/Key&amp;gt;
	&amp;lt;Property Name="ObjectID" Type="Edm.String" Nullable="false" MaxLength="70" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/&amp;gt;
	&amp;lt;Property Name="InstallationPointID" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true"/&amp;gt;
	&amp;lt;NavigationProperty Name="ServiceRequest" Relationship="c4codata.ServiceRequest_ServiceRequestServiceReferenceObject" FromRole="ServiceRequestServiceReferenceObject" ToRole="ServiceRequest"/&amp;gt;
&amp;lt;/EntityType&amp;gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 08 Sep 2022 09:57:37 GMT</pubDate>
    <dc:creator>DisplayName2</dc:creator>
    <dc:date>2022-09-08T09:57:37Z</dc:date>
    <item>
      <title>OData ServiceRequestServiceReferenceObjectCollection filter by InstallationPointID doesn't work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/odata-servicerequestservicereferenceobjectcollection-filter-by/m-p/12582508#M2009370</link>
      <description>&lt;P&gt;This oData query to ServiceRequestServiceReferenceObjectCollection:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;&lt;A href="https://my.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/ServiceRequestServiceReferenceObjectCollection?$filter=SerialID" target="test_blank"&gt;https://my.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/ServiceRequestServiceReferenceObjectCollection?$filter=SerialID&lt;/A&gt; eq 'SERIALID'&amp;amp;$select=ObjectID,InstallationPointID&amp;amp;$format=json&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt; gives me two entities:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;{
    "d": {
        "results": [
            {
                "ObjectID": "025B31541C561EDD8AA312A531497E8C",
                "InstallationPointID": "4047"
            },
            {
                "ObjectID": "06A84A6744FC1EDD8BEB170B54B85066",
                "InstallationPointID": "4047"
            }
        ]
    }
}&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;So, this query should work: (filter by InstallationPointID eq '4047')&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;&lt;A href="https://my.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/ServiceRequestServiceReferenceObjectCollection?$filter=InstallationPointID" target="test_blank"&gt;https://my.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/ServiceRequestServiceReferenceObjectCollection?$filter=InstallationPointID&lt;/A&gt; eq '4047'&amp;amp;$select=ObjectID,Inst
allationPointID&amp;amp;$format=json&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;but it doesn't, I get response with code 200 and empty results:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;{
    "d": {
        "results": []
    }
}&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;This entity field is marked as filterable in $metadata:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;&amp;lt;EntityType Name="ServiceRequestServiceReferenceObject" c4c:parent-entity-type="ServiceRequest"&amp;gt;
	&amp;lt;Key&amp;gt;
		&amp;lt;PropertyRef Name="ObjectID"/&amp;gt;
	&amp;lt;/Key&amp;gt;
	&amp;lt;Property Name="ObjectID" Type="Edm.String" Nullable="false" MaxLength="70" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/&amp;gt;
	&amp;lt;Property Name="InstallationPointID" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true"/&amp;gt;
	&amp;lt;NavigationProperty Name="ServiceRequest" Relationship="c4codata.ServiceRequest_ServiceRequestServiceReferenceObject" FromRole="ServiceRequestServiceReferenceObject" ToRole="ServiceRequest"/&amp;gt;
&amp;lt;/EntityType&amp;gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Sep 2022 09:57:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/odata-servicerequestservicereferenceobjectcollection-filter-by/m-p/12582508#M2009370</guid>
      <dc:creator>DisplayName2</dc:creator>
      <dc:date>2022-09-08T09:57:37Z</dc:date>
    </item>
  </channel>
</rss>

