cancel
Showing results for 
Search instead for 
Did you mean: 

C4C ODATA Link from ServiceRequestServiceIssueCategory to ServiceRequest

peakhendo
Explorer
0 Kudos

How do I get a link from a Service Request to Service Request Service Issue Category?

My application uses data-sets extracted from C4C using ODATA connectors and analyses them using SQL. What I need to set up my customised ODATA service to pull in something to connect the Service Request Service Issue Category Collection to the correct records in the Service Request Item collection. Usually this is obvious not this collection - so anyone done it?

Accepted Solutions (0)

Answers (1)

Answers (1)

Dedeepya
Product and Topic Expert
Product and Topic Expert

Hi Iain

can you please check the Meta data of your Odata service to get the complete Path of your OData Entity Set

peakhendo
Explorer
0 Kudos

thanks...can I just get you to confirm if I am going the right way...

I am interested in joining the ServiceRequestServiceIssueCategoryCollection to the root ServiceRequestCollection,

so I first find the AssociationSet, I can do that by inspection or in one of the NavigationProperty tags for the ServiceRequestServiceIssueCategoryCollection. After I get the AssociationSet I can then get the association..

<NavigationProperty Name="ServiceRequest" ToRole="ServiceRequest" FromRole="ServiceRequestServiceIssueCategory" Relationship="cust.ServiceRequest_ServiceRequestServiceIssueCategory"/>

<AssociationSet Name="ServiceRequestServiceIssueCategoryCollection_ServiceRequestCollection" sap:updatable="false" sap:creatable="false" sap:deletable="false" Association="cust.ServiceRequest_ServiceRequestServiceIssueCategory"><End Role="ServiceRequestServiceIssueCategory" EntitySet="ServiceRequestServiceIssueCategoryCollection"/><End Role="ServiceRequest" EntitySet="ServiceRequestCollection"/></AssociationSet>

<Association Name="ServiceRequest_ServiceRequestServiceIssueCategory"><End Type="cust.ServiceRequestServiceIssueCategory" Role="ServiceRequestServiceIssueCategory" Multiplicity="*"/>
<End Type="cust.ServiceRequest" Role="ServiceRequest" Multiplicity="1"/>
</Association>

Which tells me that there is a one to many relationship between ServiceRequest and ServiceRequestServiceIssueCategory as I'd expect.

Still doesn't tell me what fields to use though I know by inspection one that will work so its now more of an academic but is there a way to read this in the metadata? I would have expected the keyfield in serviceRequest to link to some kind of foreign key in ServiceRequestServiceIssueCategory. I can't find that link.