Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

OData ServiceRequestServiceReferenceObjectCollection filter by InstallationPointID doesn't work

DisplayName2
Participant
0 Kudos

This oData query to ServiceRequestServiceReferenceObjectCollection:

https://my.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/ServiceRequestServiceReferenceObjectCollect... eq 'SERIALID'&$select=ObjectID,InstallationPointID&$format=json

gives me two entities:

{
    "d": {
        "results": [
            {
                "ObjectID": "025B31541C561EDD8AA312A531497E8C",
                "InstallationPointID": "4047"
            },
            {
                "ObjectID": "06A84A6744FC1EDD8BEB170B54B85066",
                "InstallationPointID": "4047"
            }
        ]
    }
}

So, this query should work: (filter by InstallationPointID eq '4047')

https://my.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/ServiceRequestServiceReferenceObjectCollect... eq '4047'&$select=ObjectID,Inst
allationPointID&$format=json

but it doesn't, I get response with code 200 and empty results:

{
    "d": {
        "results": []
    }
}

This entity field is marked as filterable in $metadata:

<EntityType Name="ServiceRequestServiceReferenceObject" c4c:parent-entity-type="ServiceRequest">
	<Key>
		<PropertyRef Name="ObjectID"/>
	</Key>
	<Property Name="ObjectID" Type="Edm.String" Nullable="false" MaxLength="70" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
	<Property Name="InstallationPointID" Type="Edm.String" Nullable="true" MaxLength="40" FixedLength="true" sap:creatable="true" sap:updatable="true" sap:filterable="true"/>
	<NavigationProperty Name="ServiceRequest" Relationship="c4codata.ServiceRequest_ServiceRequestServiceReferenceObject" FromRole="ServiceRequestServiceReferenceObject" ToRole="ServiceRequest"/>
</EntityType>
  • SAP Managed Tags:
0 REPLIES 0