Symptom
You have tried modifying few fields in the Address Information tab but the After-Modify event is not getting triggered even though the fields are in the same BO node.
Environment
- SAP Cloud Application Studio
- SAP Business ByDesign
- SAP Cloud for Customer
Reproducing the Issue
- Login to SDK.
- Open the solution and navigate to the relevant path.
- Put a breakpoint in the Event After-Modify of Address Information node.
- Login to UI.
- Navigate to Customer work center.
- Switch to Addresses tab.
- Try to modify some standard fields Postal Code, Phone e.t.c.
- You can see that the debugger is not hit in the event after-modify.
Cause
A script on a node will only be called if fields of that node are changed or the association from that node is changed.
The data that you see on an account comes from a combination of different Business Object (BO) + Dependent Objects (DO) in the backend. Address information itself is a regular node on the Business Partner BO. It doesn't hold any real Address information but holds just a pointer + date values to the actual DO (address snapshot) where the real address is stored.
When you do an update, changes are done to the snapshot but no changes are done to Address Information node as nothing relevant to this has changed i.e. it still points to the same snapshot instance. Hence, updating address will not call After modify of Address Information node.
Resolution
To trigger the AddressInformation Scripts, you have to make changes in the value of the fields that are directly under the Address Information Node.
Please note that making changes in any other node element will not trigger the script.
For example: StreetPostalCode is a node element under Postal Address DO and hence the event after modify will not be triggered.
Keywords
modifying phone number doesn't trigger event after modify, email, Event after modify on e-mail change , KBA , address node , event after modify not triggered , address information node , LOD-CRM-ACC , Account , AP-RC-BDS-BO , ByDesign Studio BO definition/generation , How To