Hi Fiori devs,
I'm having this strange issue I can't seem to figure out.
So I'm extending the ca_all_apv Approve Requests Fiori app and I can do all sort of things which is great. The bad part is that the attachments tab seems to break when I utilised the override function extHookChangeFooterButtons and start reading the oButtonList elements in my Javascript code.
Let me explain!
So my current s3.controller.js file looks like this and it's doing nothing really special:
sap.ui.controller("cross.fnd.approve.requests.ca_all_apv_ext.view.S3", { // This hook method can be used to add and change buttons for the detail view footer // It is called when the decision options for the detail item are fetched successfully extHookChangeFooterButtons: function (oButtonList) { var i = 0; var aMenuButtons = oButtonList.aButtonList; } });
Take a peek at my extended Fiori app and attachments are working fine.
So I go back to my s3.controller.js file and add 1 line of code to assign the button array length to variable i.
sap.ui.controller("cross.fnd.approve.requests.ca_all_apv_ext.view.S3", { // This hook method can be used to add and change buttons for the detail view footer // It is called when the decision options for the detail item are fetched successfully extHookChangeFooterButtons: function (oButtonList) { var i = 0; var aMenuButtons = oButtonList.aButtonList; i = aMenuButtons.length; } });
Once I save and submit my changes to my Fiori system, the attachments disappear.... but the counter for attachments still exists.
I swear I must be doing something basic that's causing this in my Javascript code but can't seem to figure out what I'm doing wrong!
Any ideas?