Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: programmatic invocation of draft actions #1437

Merged
merged 8 commits into from
Dec 18, 2024
11 changes: 11 additions & 0 deletions node.js/fiori.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,14 @@ You can set the property to one of the following:
- Draft-related properties (with the exception of `IsActiveEntity`) are only computed for the target entity, not for expanded sub entities since this is not required by Fiori Elements.
- Manual filtering on draft-related properties is not allowed, only certain draft scenarios are supported.


### Programmatic Invocation of Draft Actions <Beta />

You can programmatically invoke draft actions with the following APIs:

```js
await srv.new(MyEntity, data) // create new draft
await srv.cancel(MyEntity.drafts, keys) // cancel draft
David-Kunz marked this conversation as resolved.
Show resolved Hide resolved
await srv.edit(MyEntity, keys) // create draft from active instance
await srv.save(MyEntity.drafts, keys) // activate draft
```