cancel
Showing results for 
Search instead for 
Did you mean: 

Customizing Fiori App Navigation: Overriding Extension API Event Handler

AjayDeshetty
Explorer
553

Hello Experts,

We have a requirement to extend the standard Fiori application, Manage Purchase Requisition app.

Requirement: When we are creating an order in this application, it currently navigates to a standard application, but we want it to navigate to a custom application.

Analysis: Upon investigation of standard application, we found that they're attaching ( using extension API ) an onAfterActivate event to the object page in the application. This event is executed upon completion of the creation process, and within it, they've hardcoded the navigation to a standard application using a semantic object and action.

Standard App Code :


 this.extensionAPI.getTransactionController().attachAfterActivate(jQuery.proxy(this.onAfterActivate, this));
        onAfterActivate: function(e) {
            e.activationPromise.then(function(r) {
                try {
                    var m = JSON.parse(r.response.headers["sap-message"]).message;
                    M.show(m);
                } catch (c) {}
                ;setTimeout(function() {
                    if (!this.oNavigationHandler) {
                        this.oNavigationHandler = new N(this,sap.fe.navigation.Mode.ODataV2);
                    }
                    this.oNavigationHandler.navigate("PurchaseRequisition", "createSSP", {});
                }
                .bind(this), 6000);
            }
            .bind(this));
        }

Is there a way to override the attached event so that we can write our own code for navigating to the custom application?

0 Kudos
Hi , were you able to find the solution. Cud u pls share ?

Accepted Solutions (0)

Answers (1)

Answers (1)

gregorw
Active Contributor

You could define your own application with the same semantic object and action and remove the standard app from any catalog the user have access to. Then the navigation to your custom app should work without changing any code.

AjayDeshetty
Explorer
0 Kudos

Hello Gregor Wolf,

Appreciate your reply.

Unfortunately, this option is not feasible since there is a group of users currently using the standard app using same semantic object and action.

gregorw
Active Contributor

When you have different PCFG Roles that point to different Catalogs and Groups it should still be possible.

AjayDeshetty
Explorer
0 Kudos

Thank you Gregor for the reply.

The above mentioned approach works only when user has access to either standard app or custom application. But, our requirement is to have both the applications for few users.