on 2024 Jan 09 7:57 AM
Is there a sample application demonstrating the feature bypass_draft?
The animation in the release note appeared to be using sap_sample/cap_sflight. I tried to enable the feature in the main branch. But got errors (in travel-service.js:146) while doing the same steps as in the demo animation.
[odata] - > PATCH Travel(TravelUUID='75757221A8E4645C17002DF03754AB66',IsActiveEntity=true)
[cds] - TypeError: to_Booking is not iterable
at TravelService.<anonymous> (\cap-sflight\srv\travel-service.js:146:29)
Fixing this as below did not help to get further to reproduce the demonstration.
if (to_Booking)
for (const booking of to_Booking) {..
This threw validation errors. I guess the application logic in the sample is not adapted for this feature.
Where can I get hold of the sample application used in the demonstration?
I tried to enable the feature in the sample application generated by cds add sample. This caused the server to crash when editing a record using the Edit button on the list to change the price of one Book.
[odata] - > PATCH Books(ID=201,IsActiveEntity=true)
[cds] - TypeError: Cannot read properties of undefined (reading '@Common.DraftRoot.ActivationAction')<br> at cds.ApplicationService.handle (\capv7-bypass-draft\node_modules\@sap\cds\libx\_runtime\fiori\lean-draft.js:392:46)
Patching the code that caused this error helped to edit price. But changing stock throws another error:
[cds] - DeserializationError: Error while deserializing payload
at BufferedWriter.<anonymous> (\capv7-bypass-draft\node_modules\@sap\cds\libx\_runtime\cds-services\adapter\odata-v4\okra\odata-server\deserializer\DeserializerFactory.js:233:18
So I am also wondering if this feature is released for productive use at all. Would you have had better experience using this feature than I had? The release note does not mention that this feature is released as preview?
PS: Using cds version 7.5.2
Request clarification before answering.
As gregorw mentioned, it does not work yet with CAP, but you can activate the Mass Edit following this documentation. I havent tried it out, but it should work:
https://sapui5.hana.ondemand.com/sdk/#/topic/7cc4f04364c540c397130ff92f84c3ca.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Marian.
I enabled the Edit feature in Fiori Elements and got the Edit Button, but I faced the issues mentioned in the question later on. That is why I am asking, if anyone has a got a demo working. So far, I have only seen the animation in the release notes, not a working setup.
Gregor wrote that you got a response from SAP that the issue you reported will be fixed with CDS 7.6. Did they say if the whole feature is broken till then or is it your special case that is broken?
User | Count |
---|---|
88 | |
10 | |
9 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.