cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Object page Extension for Action Issue

Former Member
0 Kudos
1,028

Hi Experts,

I am trying to implement the object page extension for custom Actions, so that I can add more action buttons to the toolbar of line item table in the object page. I followed the steps mentioned in the blog https://blogs.sap.com/2017/10/29/fiori-elements-how-to-create-an-object-page-extension/ , I could be able to create new facets but adding action using extension is giving the error message "Target was not found. Cannot set property 'oView' of undefined" and the whole object page is not loading.

Could you please suggest on this.

Regards,

Rabi

Accepted Solutions (0)

Answers (1)

Answers (1)

NizareDamoumat
Participant

Hello, 
The extension happens in two steps :
First, you have to create a controller extension to define a handler function then you will add the extension settings of the custom action to the manifest.
Here is a code snippet of the manifest file extends attribute:

{
        "sap.ui5": {
            "extends": {
                "extensions": {
                    "sap.ui.controllerExtensions": {
                        "sap.suite.ui.generic.template.ListReport.view.ListReport": {
                            "controllerName": "zfammpotrack.ext.controller.ListReportExt",
                            "sap.ui.generic.app": {
                                "ZCDSMM_POTRACKING_C": {
                                    "EntitySet": "ZCDSMM_POTRACKING_C",
                                    "Actions": {
                                    "openID": {
                                        "id" : "openIDButton",
                                        "text" : "Open PopUp",
                                        "press" : "onOpen",
                                        "requiresSelection": false,
                                        "logicalAction": "Create"
                                    }
                                }
                                }
                            }
                        }
                    }
                }
            }
        }
    }

Thanks to the new generation of IDEs, such as SAP Business Application Studio (SAP BAS), the entire process of creating a controller extension and updating the manifest file can be handled efficiently through wizards and guided development tools.

Regards,

Nizare