cancel
Showing results for 
Search instead for 
Did you mean: 

Feature bypass_draft in CAP not working on POST

Marian_Zeis
Active Contributor

Hello Experts,

i am trying to use the new bypass_draft feature in cap version 7.5.0.
https://cap.cloud.sap/docs/releases/dec23#sapui5-mass-edit
https://cap.cloud.sap/docs/releases/changelog/#dec-23-added

Unfortunately the POST request did not work and the created entity is not activated but is a draft.
I did as in the changelog and added the feature flags and then executed a post request.

Package.json

  "cds": {
"fiori": {
"lean_draft": true,
"bypass_draft": true
}
}

POST Request:

POST http://localhost:4004/odata/v4/orders/Orders HTTP/1.1
Content-Type: application/json
{"OrderNo":"3","buyer":"test@test.de","IsActiveEntity": true}

I try to use it in my GitHub Repo and here is the PR which i created for it:
https://github.com/marianfoo/ui5-cc-spreadsheetimporter/pull/438/files

Anything i did wrong in the config or http request?

Cheers
Marian

Marian_Zeis
Active Contributor
0 Kudos

I debugged a little bit and saw that there is no "IsActiveEntity" in the relevant code.

I could not determine where the parameter "IsActiveEntity" is lost

Accepted Solutions (1)

Accepted Solutions (1)

Marian_Zeis
Active Contributor

Fixed with @sap/CDs Version 7.5.3

Answers (0)