Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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, 10, null, ["sku", "label", "currency"])

def resultMatrix = api.newMatrix().withColumnFormats([
        "sku"  : FieldFormatType.TEXT,
        "label":FieldFormatType.TEXT,
        "currency": FieldFormatType.TEXT
]).withRows(products);

resultMatrix.rowSelectionBackEndAction("productsDataSet")
        .withLogicName("BackEndActionLogic")
        .withColumns("sku")
        .withButtonLabel("New Quote")

return resultMatrix;

See also 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.

  • No labels