Files
cloud-cap-samples/bookshop/srv/AdminService-Authors-CREATE.cds
2022-07-26 09:47:30 +02:00

17 lines
555 B
Plaintext

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()
"