Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

A wizard dashboard is a sequence of steps that help users complete a task in Pricefx.

...

  1. Create a calculation logic where you define the look and functionality of your wizard dashboard.
    The main condition is that your code returns the controller object – then it will be recognized by the client as a wizard dashboard among other dashboards.
    For example, for the Online Price section of the Wizard Dashboard shown in the screenshot above, the following code was used:

    Code Block
    def controller = api.newController()
    
    controller.addHTML("<h2>Welcome to Meatball Online</h2>")
    
    controller.addButton("1. STEP: Change Online Strategy","pricingParametersPage")
    controller.addButton("2. STEP: Check Online Prices","priceGridPage","main")
    controller.addButton("3. STEP: Go to Competitor Prices","competitionPage",)
    controller.addButton("4. STEP: Change Average Discount","pricingParametersPage","94.LT")
    
    controller.addBackendCall("Calculate Online PL","/pricegridmanager.calculate/343",null,"OK Start recalculation","Stop recalculation")
    
    controller.addDownloadButton("Download XLS","/formulamanager.executeformula/DashboardExport?output=xls","""{"Customer":"${customerId}", "targetDate":"${new Date().format("yyyy-MM-dd")}"}""")
    
    return controller
  2. In Dashboards, create a new dashboard where you select your calculation logic created in the previous step.In the user profile in the Wizard Dashboard field, select this dashboard.
    Wizard Dashboard will be displayed to the particular user next time when the user logs in.
    (warning) If you select other type of dashboard (which is not connected to a calculation logic returning the controller object), nothing will display.

Tips

  • Review the complete list of available targetPage parameters.

  • In the calculation logic (in this case DashboardExport in the above example), you can retrieve parameters specified in the addDownloadButton method by using api.stringUserEntry:

    Code Block
    def targetDate = api.stringUserEntry("targetDate");
  • In the calculation logic you can use <a> tag also with external links, but you need to use the target-attribute (target="_parent") inside of the tag. If you do not use the target-attribute, then rendering of the link fails in Salesforce. See a correct example of link generation below:

    Code Block
    controller.addHTML("<p><a target=\"_parent\" href=\"https://www.atlassian.com\">Atlassian</a></p>")
  • You can add a button to the dashboard that opens a configuration wizard:

    Code Block
    languagegroovy
    controller.addButton("Open Dashboard", "dashboardPage", null, "FirstDash")