Add side effect of filling the fields of an address once we have a selection
This commit is contained in:
@@ -30,6 +30,7 @@ annotate AdminService.Orders with {
|
||||
SearchSupported: 'true',
|
||||
Parameters: [
|
||||
{ $Type: 'Common.ValueListParameterOut', LocalDataProperty: 'shippingAddress_AddressID', ValueListProperty: 'AddressID'},
|
||||
{ $Type: 'Common.ValueListParameterDisplayOnly', ValueListProperty: 'PostalCode'},
|
||||
{ $Type: 'Common.ValueListParameterDisplayOnly', ValueListProperty: 'CityName'},
|
||||
{ $Type: 'Common.ValueListParameterDisplayOnly', ValueListProperty: 'StreetName'},
|
||||
{ $Type: 'Common.ValueListParameterDisplayOnly', ValueListProperty: 'HouseNumber'},
|
||||
@@ -96,15 +97,6 @@ annotate AdminService.Orders with @(
|
||||
},
|
||||
// TODO: Trigger side effects when `shippingAddress_AddressID` is changed
|
||||
FieldGroup#ShippingAddress: {
|
||||
Common.SideEffects : {
|
||||
EffectTypes : #ValueChange,
|
||||
SourceProperties : [shippingAddress_AddressID],
|
||||
TargetProperties : [
|
||||
shippingAddress.HouseNumber,
|
||||
shippingAddress.StreetName,
|
||||
shippingAddress.CityName
|
||||
]
|
||||
},
|
||||
Data: [
|
||||
{Value: shippingAddress_AddressID, Label:'{i18n>ShippingAddress}'},
|
||||
{Value: shippingAddress.HouseNumber, Label:'{i18n>HouseNumber}'},
|
||||
@@ -114,6 +106,16 @@ annotate AdminService.Orders with @(
|
||||
]
|
||||
},
|
||||
},
|
||||
Common.SideEffects : {
|
||||
EffectTypes : #ValueChange,
|
||||
SourceProperties : [shippingAddress_AddressID],
|
||||
TargetProperties : [
|
||||
shippingAddress.HouseNumber,
|
||||
shippingAddress.StreetName,
|
||||
shippingAddress.CityName,
|
||||
shippingAddress.PostalCode
|
||||
]
|
||||
},
|
||||
) {
|
||||
createdAt @UI.HiddenFilter:false;
|
||||
createdBy @UI.HiddenFilter:false;
|
||||
|
||||
@@ -21,7 +21,7 @@ module.exports = db => {
|
||||
PostalCode: '68789',
|
||||
Country: 'Germany',
|
||||
StreetName: 'SAP-Allee',
|
||||
HouseNumber: '25',
|
||||
HouseNumber: '25'
|
||||
},
|
||||
{
|
||||
BusinessPartner: '1003765',
|
||||
|
||||
Reference in New Issue
Block a user