Closed Nathan2020-0126 closed 8 years ago
First of all, you can't get any field value in getToolbarButtons(), entity is not available there yet. And the thing you alert is a field name, not a form field.
You can get in in a click handler though, using this.form.CustomerFax.value.
ReportHelper.createToolButton({
title: ...,
....
getParams: () => ({
someFaxParam: this.form.CustomerFax.value
})
});
I don't understand. I want to set the button title based on field value. Is there any sample?
No
Find button with jQuery and change contents, thats only option.
Thank you, I work it, just as you said.
I want to get the value of filed 'CustomerFax', but it always show the field name,'CustomerFax'. How to get the 'CustomerFax' field value?
getToolbarButtons() { var buttons = super.getToolbarButtons(); alert(OrderRow.Fields.CustomerFax) buttons.push(WujP_Andon.Common.ReportHelper.createToolButton({ title: 'Invoice', cssClass: 'export-pdf-button', reportKey: 'Northwind.OrderDetail', getParams: () => ({ OrderID: this.get_entityId() }) })); return buttons; }