You can add custom coding before calling standard methods provided by SAP Fiori elements.
You can use the onBefore extension methods to add custom coding. The following extension methods are supported:
-
onBeforeCreatetriggered before the standard create method is invoked
-
onBeforeEdittriggered before the standard edit flow is invoked
-
onBeforeSavetriggered before the standard save method is invoked
-
onBeforeDiscardtriggered before the standard draft discard is invoked
-
onBeforeDeletetriggered before the standard delete method is invoked for an object page, or for each selected table context
For more information about using the extension methods, see the Related Links section below.
If you want to use custom code to display messages, use the
securedExecutionmethod.Also use this method to wrap custom code in case it changes the state of the object. In this case, ensure that the
"updatesDocument"property is set to true so that SAP Fiori elements can display a confirmation popover, allowing users to discard their changes if they try to cancel or navigate away from the object.
-
For more information and live examples, see the SAP Fiori development portal at Standard Floorplans - Extensions - Overview.
-
For more information, see EditFlow in the Demo Kit.