Symptom
SAP Cloud for Customer System triggers the Save multiple times when creating a new Opportunity.
Environment
- SAP Cloud for Customer (in combination with custom code)
- SAP SDK Cloud Application Studio
Reproducing the Issue
- Go to the Sales work center
- Go to the Opportunities view
- Create new
- Save
- Observe: in the cloud Application Studio you noticed that the EventBeforeSave-Event is Triggered Multiple Times
Cause
In a pure standard system, the standard BeforeSave events run and the BO is marked as finalized. However, in a system with extensibility or PDI, there are modifications to the BO after it was finalized. Due to this, the finalization is reset and BeforeSave events are triggered again. Hence, depending on whether you have calculated extension fields or how many PDI solutions are in the system and what they do, the BeforeSave events (also the standard events) are triggered multiple times.
Resolution
The events must be implemented in a way to handle this.
Keywords
KBA , AP-RC-BDS-1O , ByDesign Studio OneOffs , Problem
Product
SAP Cloud for Customer add-ins all versions