/
Action from Dashboard
Action from Dashboard
This section explains how to make a link which will perform a certain action for a given document.
Dashboard Portlet with a list of Quotes in Result Matrix
Example of using the linkCell() method to create a link with an action:
import net.pricefx.common.api.FieldFormatType
import net.pricefx.formulaengine.scripting.AppPages
def quotes = api.find("Q", 0, 10, "-uniqueName")
def resultMatrix = api.newMatrix().withColumnFormats([
"uniqueName" : FieldFormatType.STRING,
"label" : FieldFormatType.STRING,
"expiryDate" : FieldFormatType.DATE,
"workflowStatus": FieldFormatType.STRING,
"action" : FieldFormatType.LINK
])
def getTargetPageState(itemId) {
return [
id : itemId,
tpAction: 'SUBMIT'
]
}
def rows = quotes.collect {
[
uniqueName: it.uniqueName,
label : it.label,
expiryDate: it.expiryDate,
workflowStatus: it.workflowStatus,
action : it.workflowStatus == "DRAFT" ?
resultMatrix.linkCell('Submit',
AppPages.QC_DETAILS_PAGE,
getTargetPageState(it.typedId)
) : null
]
}
return resultMatrix.withRows(rows)
, multiple selections available,
Related content
How to Add a Link to Dashboard
How to Add a Link to Dashboard
More like this
Creation of Quote with Selected Products
Creation of Quote with Selected Products
More like this
Action from Simple Link
Action from Simple Link
More like this
BackEndAction Logic
BackEndAction Logic
More like this
Context Linking
Context Linking
Read with this
How to Create Wizard Dashboard
How to Create Wizard Dashboard
More like this
Found an issue in documentation? Write to us.