cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Fiori 'My Lead' extension/Enhancement

Former Member
0 Kudos

Hello All,

In 'My Leads' fiori app , I wanted to have an enhancement like 'Add Lead' as an option in footer of Master List page

Like we have in 'My Opportunity' app,

To start with I created extension project with parent application as 'My Lead' from remote SAP UI5 Netweaver Gateway Repository in SAP Web IDE.

In the the project I created extension for controller , S2 (as this has the definations for header and footer). and added following code in it just to see if button appears at desired place.


sap.ui.controller("cus.crm.lead.CRM_LEADSExtension.view.S2Custom", {

// Add Lead Button

getHeaderFooterOptions: function() {

    var h_ext = { oAddOptions: {

  sId: "BTN_S2_ADD",

  onBtnPressed: function() {

    // alert("add create lead view");

             }

                }

        };

return h_ext;

}

}

Okay , In web IDE preview I see the  '+' button but previous icons for Filter and Sort icon got dissapeared.

I assumed the controllers get extended , what am I doing wrong ? and what after the plus icon gets added, What would be the ideal direction to move ahead like:

  • Creating a view like form to take Lead related values
  • '+' icon to navigate to that form
  • form to submit the value to a oData
  • and is oData already there  realize this creation option? as in my SAP system  I see there is already methods for Lead_Create etc in the class which is responsible for oData for My Lead app .

I'm more looking into best practices , what is the standard way of doing such enhancements. Resources in internet provide for simple enhancement like hiding a field or something like that only.

Accepted Solutions (0)

Answers (2)

Answers (2)

michal_keidar
Active Contributor
0 Kudos

Hi Gupta,

Have you selected to extend this controller with an empty controller or with copy of the original controller?

I recommend in this case to extend with a copy of the original controller and add your code in this method, so you won't lose the other buttons.


Regards,
Michal.

darren_yeh2
Member
0 Kudos

Hi,

Just curious on how the enhancement went ?

We're also interested in this.

thanks,