Sometimes it might be useful for users to be able to open a quote page within Pricefx directly from the dashboard.Links to quotes
The easiest way is to use the addLink DashboardController method.
Code Block | ||||
---|---|---|---|---|
| ||||
def controller = api.newController()
controller.addLink("Open Waterfall", controller.PA_CHART_WATERFALL_PAGE, null, "MyWaterfallChart")
return controller |
Note: This method is available from the 7.0 Bijou release.
Link in a Result Matrix
Links to documents can be included in a result matrix. See an example of a dashboard logic element below, which demonstrates various format types in a result matrix, including a link to a quoteQuote:
Paste code macro | ||
---|---|---|
| ||
def fields = [ [name: "% String value", type: FieldFormatType.TEXT], [name: "Integer value", type: FieldFormatType.INTEGER], [name: "Numeric value", type: FieldFormatType.NUMERIC], [name: "Date value", type: FieldFormatType.DATE], [name: "Date Time value", type: FieldFormatType.DATETIME], [name: "Link", type: FieldFormatType.LINK] ]; def m = api.newMatrix(fields.collect{it -> it.name}); def rows = []; def d = new Date(); for (int i=0; i< 100; i++) { rows << ["somewhere "+i, i, 0.11*i, d-i, d+i, m.linkCell('P-'+i, 'priceShopPage', 'P-'+i)]; } fields.each {field -> m.setColumnFormat(field.name, field.type); } rows.each {row -> m.addRow((0..row.size()-1).collectEntries{index -> [fields[index].name, row[index]] }); } def event_name = api.dashboardWideEvent('recalculateDashboard') m.onRowSelection().triggerEvent(event_name) .withColValueAsEventDataAttr('% String value', 'DA1') .withColValueAsEventDataAttr('Numeric value', 'DA2') .withColValueAsEventDataAttr('Integer value', 'DA3') return m; |
...