Starts a brixxbox app.


  1. startOptions - This is a json object with the start parameters:

    • appName - name of the config as string

    • noInitialRefresh - the grids of the target apps are not refreshed on startup. Can be used if you send additionalValues for the selection and you want to avoid to fetch data, that will be imidiately replaced with the correct filtered data.

    • noReturnRefresh - default is false. This value can be set to true, if there is no need for the calling parent to refresh upon return.

    • parentApp - the parent for the new api. If not set, this will be set to brixxApi from the caller, your current api.

    • id - (optional) id of the record to load in the new app

    • startMode - (optional)

      • "modal" will start in a modal overlay window (default),

      • "tab" will start the app in a new tab. You will not get a brixxboxApi object as a result in this case!

      • "page" will replace the content in the current browser tab

      • "invisible" will not show the app

      • "popup" will start as modal in a movable and resizable window

    • appMode - (optional)

      • "form" will start the app as a Form (default),

      • "list" will start the app as a List of Records,

    • additionalValues (optional): json object of control values that should be set in the new app

    • parameters: (optional): json array of parameter flags (the flags you can choose in the menu endpoint editor) to set for the new app

    • container: (optional): a jQuery object to a div, where the new brixxbox will be embedded

Return value

If a brixxbox is started in "modal" mode, the function returns the brixApi object of the new app. You have to await the result (Example 3) to use it.

Example Usages

This will start the app "myapp" in a modal dialog.

   brixxApi.startBrixxbox({appName: "myapp"}); //starts myapp as a form
   brixxApi.startBrixxbox({appName: "myapp", appMode:"list"}); //starts myapp as a list

This will start the app "myapp" in a modal dialog, load the record with id 1 and set the values of the 2 controls "addressNo" and "orderNo" inside the new app

   let startOptions = {
      appName: "myapp",
      id: 1,
      startMode: "modal",
      additionalValues: {
         addressNo: 123,
         orderNo: 456
      parameters:["openOrders", "shippedORders"]

This will start the app "myapp" in a modal dialog, and add an addEventListener for the save event.

   let modalBrixxApi = await brixxApi.startBrixxbox({appName: "myapp"});
   modalBrixxApi.addEventListener("onRecordSaved", function (modalApi, eventArgs) {
      alert("Record saved in " + modalApi.appName);

Last updated