Skip to content

Latest commit

 

History

History
47 lines (23 loc) · 1.71 KB

File metadata and controls

47 lines (23 loc) · 1.71 KB

Using Custom Code Before Standard Operations

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:

  • onBeforeCreate

    triggered before the standard create method is invoked

  • onBeforeEdit

    triggered before the standard edit flow is invoked

  • onBeforeSave

    triggered before the standard save method is invoked

  • onBeforeDiscard

    triggered before the standard draft discard is invoked

  • onBeforeDelete

    triggered 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.

Note:

If you want to use custom code to display messages, use the securedExecution method.

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.