on 01-13-2020 10:37 AM
Hi Experts,
I was trying to get the selected item/row of the smart table that is displaying the line items in the Fiori Elements App "Manage Sales Contracts" but unable to fetch it. I am basically trying to create a custom List Items app using the OData Service of standard app to fulfill one of my requirement, which is not getting done by normal extensions.
What I am doing: I am trying to get the Selected Context of the table by using below code, but it doesn't work. I picked the table id using the inspect element method.
var oSelectedItem = sap.ui.getCore().byId("com.demo.sap.msc_demo1::sap.suite.ui.generic.template.ListReport.view.ListReport::C_SalesContractWl_F1851--responsiveTable-listUl").getSelectedItems();
var item1 = oSelectedItem[0];
var cells = item1.getCells();
With above code, i get this error., basically it's not picking table with the id and showing as undefined.
Please suggest.
Thanks,
Rakesh
Hi,
Solved using below piece of code:
evt.getSource().getParent().getParent().getSelectedItems();
Thanks,
Rakesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.