Skip to Content

XSODATA Use generated key in service url call

Experts,

Created XS odata with following service

service {
"PROJ.model::CV_PROJDETAIL" as "CV_ProjectDetail" keys generate local "GENERATED_ID" aggregates always;
} annotations { enable OData4SAP; }

And result of uri call in my application got CORRECT results as follows

{"d":{"results":[{"__metadata": {"type":"odata.CV_ProjectDetailType","uri":"/odata/odata.xsodata/CV_ProjectDetail('543859892167869371')"},"C_NAME":"SAP","CR_NUMBER":7},
]}}

But if I try to call GET /odata/odata.xsodata/CV_ProjectDetail('543859892167869371')

I got a "RESOURCE NOT FOUND" error.

Any correction that I can do to make a successful call using the generated id ?

Thanks,

Tanveer

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Dec 11, 2017 at 10:15 AM

    The reason for that can be found in the documentation and was recently also discussed here.

    Regards,
    Florian

    Add comment
    10|10000 characters needed characters exceeded