Hello all,
I've occupied myself for a while now with the Mobile Development kit and tried to develop a crud sample application based on the sample service "com.sap.edm.sampleservice.v2" in SAP Cloud Platform mobile services. Everything worked fine until now, but now I've encountered the following problem. I want to create an entity of entity type "SalesOrderItem" with the following action:
{ "ActionResult": { "_Name": "result" }, "CreateLinks": [ { "Property": "Header", "Target": { "EntitySet": "SalesOrderHeaders", "ReadLink": "/SalesOrdersOnline/Rules/Common/ChangeSet/ChangeSetSwitchReadLink.js" } }, { "Property": "ProductDetails", "Target": { "EntitySet": "Products", "QueryOptions": "$filter=ProductId eq '{{#Control:ObjectCellListPickerProductId/#Value/#First/#Property:ReturnValue}}'" } } ], "OnFailure": "/SalesOrdersOnline/Actions/CreateUpdateDelete/CreateEntityFailure.action", "OnSuccess": "/SalesOrdersOnline/Rules/Common/ChangeSet/CreateEntitySuccess.js", "Properties": { "CurrencyCode": "#ClientData/#Property:Product/#Property:CurrencyCode", "DeliveryDate": "#Control:DatePickerDeliveryDate/#Value", "GrossAmount": "/SalesOrdersOnline/Rules/SalesOrder/SOItemCreateUpdate/GrossAmount.js", "ItemNumber": "/SalesOrdersOnline/Rules/SalesOrder/SOItemCreateItemNumber.js", "NetAmount": "/SalesOrdersOnline/Rules/SalesOrder/SOItemCreateUpdate/NetAmount.js", "ProductId": "#Control:ObjectCellListPickerProductId/#Value/#First/#Property:ReturnValue", "Quantity": "#Control:SimplePropertyQuantity/#Value", "QuantityUnit": "#Control:SimplePropertyQuantityUnit/#Value", "SalesOrderId": "/SalesOrdersOnline/Rules/SalesOrder/GetSalesOrderId.js", "TaxAmount": "/SalesOrdersOnline/Rules/SalesOrder/SOItemCreateUpdate/TaxAmount.js" }, "Target": { "EntitySet": "SalesOrderItems", "Service": "/SalesOrdersOnline/Services/SampleSrv.service" }, "ValidationRule": "/SalesOrdersOnline/Rules/SalesOrder/SOItemCreateUpdate/Validation.js", "_Type": "Action.Type.ODataService.CreateEntity" }
It works fine if I only include the CreateLink for the "Header" navigation property, but as soon as I also use the CreateLink for the "ProductDetails" navigation property I encounter the following error:
"Property with name ProductDetails does not participate in any OData Association. Cannot return partnerPath."
Has anybody a clue what could be the reason for that?