This commit is contained in:
D065023
2020-01-28 18:14:24 +01:00
parent fa880e2987
commit 29840afc0b
2 changed files with 4 additions and 1 deletions

View File

@@ -11,7 +11,9 @@ module.exports = cds.service.impl(async function () {
console.log('>> Received message', msg.data)
const BUSINESSPARTNER = msg.data.KEY[0].BUSINESSPARTNER
const orders = await cds.tx(msg).run(SELECT.from(Orders).where({ createdBy: BUSINESSPARTNER }))
this.emit('ContactDetailsChanged', { orders })
const payload = { orders }
this.emit('ContactDetailsChanged', payload)
console.log('<< Emitting message', payload)
})
/** Add some discount for overstocked books */