Skip to main contentMAF Configuration Practices

Additional logic to controllers out of the box

About this task

Eventually, extra logic is required to some configuration. Instead of replacing the entire method you could increment the steps to be executed along with the native method. The additional steps should be placed inside a function in AppCustomizations.js of the same signature (name and parameters) of the original one.

The sequence execution cannot be enforced, all methods with the same name are subscribed to that event dispatched and the order is not guaranteed by the platform mechanisms.

Procedure

Step 1: Find the method you want to do additional processing.

<dialog id="saveDiscardWorkLog" [...] on-secondary-action="closeWorkLogSaveDiscard" secondary-action-text="Discard">

Step 2: Include the logic inside the method.

closeWorkLogSaveDiscard() {
// additional parallel steps
console.log(`intercepting closeWorkLogSaveDiscard`);
}