Skip to main content

C4C: When PDI Finalize logic is re-triggered

Submitted by Stefan Barsuhn on

Some background information recently obtained via an SAP incident regarding the finalize logic (finalize means that BeforeSave is triggered):

a BeforeSave determination for a given BO is triggered every time the FINALIZE for that BO is triggered. This is generally triggered during the save transaction. Now, during the FINALIZE phase, if the BO modifies itself, there is no impact on its finalize status. However, if the BO has been modified by another BO, or, for example, an action on this BO has been triggered, the BO's finalize status will be reset, and, its corresponding FINALIZE shall be re-triggered, resulting in the corresponding BeforeSave events getting triggered again.

I already knew that changes made in reuse functions re-trigger the finalize logic, but have now learned that actions re-trigger finalize as well.

Note that, according to SAP support, in case you are calling an action, a re-finalize will happen even if the action does not apply any changes. This means if the Opportunity.Root.BeforeSave calls an Opportunity action, the Opportunity.Root.BeforeSave will be triggered again, even if the action did not change anything.