From 9617e576f0e84da8af8c5710f7e6fbc1f6e46c12 Mon Sep 17 00:00:00 2001 From: nkaputnik Date: Tue, 26 Jul 2022 09:47:30 +0200 Subject: [PATCH] First push --- bookshop/srv/AdminService-Authors-CREATE.cds | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 bookshop/srv/AdminService-Authors-CREATE.cds diff --git a/bookshop/srv/AdminService-Authors-CREATE.cds b/bookshop/srv/AdminService-Authors-CREATE.cds new file mode 100644 index 00000000..3af7eb7a --- /dev/null +++ b/bookshop/srv/AdminService-Authors-CREATE.cds @@ -0,0 +1,17 @@ +using from '..\admin-service'; +annotate entity AdminService.Authors with @extension.logic.insert : "async function run() { + //debugger + //while (true) {} + //process.exit() + //1.substring() + // let res = await specialselect + let res = await SELECT.one`title`.from(`Books`).where(`ID=201`) + let { title } = res + let Author = req.data + Author.modifiedBy = "Custom Event handler changed this!" + Author.placeOfDeath = " --- Somewhere over " + title + " --- create in Sandbox" + //await this.emit("createdAuthor", { Author }) + return Author +} +run() +" \ No newline at end of file