Creation of Quote with Selected Products
This example shows how to create a portlet which shows a list of products where the user can select several of them, and ask for a new quote to be created with those products.
Dashboard portlet logic which renders the list of products and the action “New Quote”.
def products= api.find("P", 0, 20, null, ["sku", "label", "currency"])
def quoteTypes = api.find("QTT", 0, 10, "uniqueName")
def resultMatrix = api.newMatrix().withColumnFormats([
"sku" : FieldFormatType.TEXT,
"label":FieldFormatType.TEXT,
"currency": FieldFormatType.TEXT
]).withRows(products);
def options = [:]
quoteTypes.each { it -> options[(it.uniqueName)] = it.label ?: it.uniqueName }
resultMatrix.rowSelectionBackEndAction("productsDataSet")
.withLogicName("BackEndActionLogic")
.withColumns("sku")
.withButtonLabel("New Quote")
.withOptions("QuoteType", options)
return resultMatrix;
See also an example of the BackEndActionLogic, which shows you how to receive the parameter with selection of items from a matrix and how to construct the context link action.
, multiple selections available,
Related content
Create a Quote
Create a Quote
More like this
Configure a Quote
Configure a Quote
Read with this
Quote Types
Quote Types
More like this
How to Create a Quote from a Logic
How to Create a Quote from a Logic
More like this
Create Quote (SAP IS Adapter)
Create Quote (SAP IS Adapter)
More like this
Contextual Action Button
Contextual Action Button
Read with this
Found an issue in documentation? Write to us.