.BusinessPartner -> .contact
This commit is contained in:
@@ -34,7 +34,7 @@ annotate AdminService.Orders with {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
$Type : 'Common.ValueListParameterOut',
|
$Type : 'Common.ValueListParameterOut',
|
||||||
LocalDataProperty : 'shippingAddress_BusinessPartner',
|
LocalDataProperty : 'shippingAddress_contact',
|
||||||
ValueListProperty : 'BusinessPartner'
|
ValueListProperty : 'BusinessPartner'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ const { Books, Addresses } = db.entities // entities in local database
|
|||||||
module.exports = (admin => {
|
module.exports = (admin => {
|
||||||
// Handler to delegate ValueHelp requests to S/4 backend, fetching current user's addresses from there
|
// Handler to delegate ValueHelp requests to S/4 backend, fetching current user's addresses from there
|
||||||
admin.on ('READ', 'usersAddresses', (req) => {
|
admin.on ('READ', 'usersAddresses', (req) => {
|
||||||
|
console.trace()
|
||||||
const { SELECT } = cds.ql(req) //> convenient alternative to bupa.transaction(req).run(SELECT...)
|
const { SELECT } = cds.ql(req) //> convenient alternative to bupa.transaction(req).run(SELECT...)
|
||||||
return SELECT.from (externalAddresses) .where ({ contact: req.user.id || 'anonymous' })
|
return SELECT.from (externalAddresses) .where ({ contact: req.user.id || 'anonymous' })
|
||||||
//> this is applying projection from CDS model generically, i.e. the equivalent of:
|
//> this is applying projection from CDS model generically, i.e. the equivalent of:
|
||||||
|
|||||||
Reference in New Issue
Block a user