How come my button is showing above the rows? My c...
# suitescript
m
How come my button is showing above the rows? My code looks like this: const ui_form = ui.createForm({ title: 'Merged Data from Saved Searches' }); //Create Sublist Structure const sublist = ui_form.addSublist({ id: 'custpage_sales_orders', type: ui.SublistType.LIST, label: 'Transactions' }); sublist.addButton({ id : 'download', label : 'Download', functionName: 'Download_PDF' }); sublist.addField({ id: 'custpage_internal_id', label: 'Internal ID', type: ui.FieldType.TEXT });
w
because you add it at the sublist instance, if you want it to show at the top, you should do ui_form.addButton();
👍 1
e
and you can’t add a button to sublist columns, if that is what you were trying to do. the equivalent would be to add a field, inlinehtml, then draw the button
👍 1
m
I want to show it on the row where the column values are. I'll try the inlinehtml. Thanks.
inlinehtml is not supported in the sublist.addField method. What I am trying to do is allow the user the option to download an invoice pdf from a list. I figured, maybe we could add a button against each row, but that appears not possible. Maybe we can add a checkbox and once they select that checkbox they can hit the download button - that might work.