Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3570

Re: My Travel and Expenses extensibility (Attachments)

$
0
0

Hi Jakob,

 

The attachment form is "injected" into the S4 view. So you are not able to create any extensions directly from the extensions pane.

 

You might want to create a custom S4 controller and do something like this:

 

onAfterRendering : function(){  var oToHide = this.getView().byId("attachmentsForm");  oToHide.setVisible(false);
},

Sometimes you need to inspect the DOM object to find the form ID by using JQuery. Print the contents of console.log(this.getView()) to get the ID by name or by index and use something like:

 

this.getView().getContent()[1].setVisible(false);

the following might work as well:

 

var b = this.getView().getModel("i18n").getProperty("EXPENSE_ATTACHMENTS_TIT_FORM");
var f = $("form:contains('"+b+"')");
f.hide();

 

Let us know if this works.

 

Enjoy!


Viewing all articles
Browse latest Browse all 3570

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>