on ‎2024 Jun 04 9:05 PM
Hi,
I have a code list entity, and in the READ handler of the code list entity, I would like to access the context data ID where this code list is being used, is there any way to access the ID of the current context, I have tried cds.context, req.context but no luck! I only see details of the code list entity, I have not find a way to access the corresponding context data. Node.js SAP Fiori Cloud
Thanks,
Tatiana F.
Request clarification before answering.
Hi Tatiana,
The CAP server will only receive the corresponding GET request to return the requested data. The CAP server is a stateless application, that means the only available information must be part of the request.
In your custom handler, you can analyse the query with `req.query`, but this only includes the information based on the incoming HTTP request.
Best regards,
David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.