{
  "formId": "actionpanel",
  "entity": "ActionPanel",
  "title": "Action Panel Entry",
  "idField": "ActionPanelId",
  "pages": [
    {
      "pageId": "General",
      "pageName": "General",
      "sections": [
        {
          "sectionId": "GeneralInfo",
          "sectionName": "Action Definition",
          "layout": { "columns": 12 },
          "fields": [
            { "fieldId": "ActionPanelId", "type": "number", "DefaultValue": 0, "PostData": true, "IsVisible": false },
            {
              "fieldId": "MenuId",
              "label": "Menu Id",
              "type": "number",
              "mandatory": true,
              "DefaultValue": -1,
              "layout": { "colSpan": 4 },
              "helpText": "The screen's numeric MMENU MenuId this action applies to. -1 = global (every screen)."
            },
            {
              "fieldId": "Label",
              "label": "Label",
              "type": "text",
              "mandatory": true,
              "MaxLength": 200,
              "layout": { "colSpan": 8 }
            },
            {
              "fieldId": "ActionType",
              "label": "Action Type",
              "type": "combobox",
              "mandatory": true,
              "DefaultValue": 1,
              "layout": { "colSpan": 4 },
              "PickLists": [
                { "key": 1, "value": "Form" },
                { "key": 2, "value": "Report" },
                { "key": 3, "value": "Command" },
                { "key": 4, "value": "Show" }
              ]
            },
            { "fieldId": "Icon", "label": "Icon", "type": "text", "MaxLength": 100, "layout": { "colSpan": 4 } },
            { "fieldId": "Color", "label": "Color", "type": "text", "MaxLength": 30, "layout": { "colSpan": 4 } },
            { "fieldId": "Description", "label": "Description", "type": "textarea", "MaxLength": 500, "layout": { "colSpan": 12 } },
            {
              "fieldId": "Screens",
              "label": "Screens (comma-separated)",
              "type": "text",
              "MaxLength": 1000,
              "layout": { "colSpan": 6 },
              "helpText": "Legacy screen-name targeting, kept for parity with the static config it replaces; MenuId is the primary key used by GetActionsForScreen."
            },
            { "fieldId": "Channel", "label": "Channel", "type": "text", "MaxLength": 100, "layout": { "colSpan": 6 } },
            { "fieldId": "SortOrder", "label": "Sort Order", "type": "number", "DefaultValue": 9999, "layout": { "colSpan": 4 } },
            {
              "fieldId": "Status",
              "label": "Enabled",
              "type": "checkbox",
              "DefaultValue": 1,
              "layout": { "colSpan": 4 }
            }
          ]
        },
        {
          "sectionId": "Target",
          "sectionName": "Target (fill only the field(s) relevant to the chosen Action Type)",
          "layout": { "columns": 12 },
          "fields": [
            { "fieldId": "EntityId", "label": "Entity Id", "type": "number", "DefaultValue": 0, "layout": { "colSpan": 4 } },
            { "fieldId": "EntityName", "label": "Entity Name", "type": "text", "MaxLength": 200, "layout": { "colSpan": 8 } },
            { "fieldId": "ReportId", "label": "Report Id", "type": "number", "DefaultValue": 0, "layout": { "colSpan": 4 } },
            { "fieldId": "WebFormName", "label": "Web Form Name", "type": "text", "MaxLength": 200, "layout": { "colSpan": 4 } },
            { "fieldId": "WebForm", "label": "Web Form", "type": "text", "MaxLength": 200, "layout": { "colSpan": 4 } },
            { "fieldId": "WebFormSecondURL", "label": "Web Form Second URL", "type": "text", "MaxLength": 500, "layout": { "colSpan": 6 } },
            { "fieldId": "Command", "label": "Command", "type": "text", "MaxLength": 200, "layout": { "colSpan": 6 } },
            { "fieldId": "BizTransactionClassId", "label": "Biz Transaction Class Id", "type": "number", "DefaultValue": 0, "layout": { "colSpan": 4 } },
            { "fieldId": "ModuleName", "label": "Module Name", "type": "text", "MaxLength": 100, "layout": { "colSpan": 4 } },
            { "fieldId": "ListMenuId", "label": "List Menu Id", "type": "number", "DefaultValue": -1, "layout": { "colSpan": 4 } },
            { "fieldId": "Criteria", "label": "Criteria", "type": "textarea", "MaxLength": 1000, "layout": { "colSpan": 8 } },
            { "fieldId": "Level", "label": "Level", "type": "number", "DefaultValue": 0, "layout": { "colSpan": 4 } }
          ]
        }
      ]
    }
  ],
  "api": {
    "save": "Framework.ActionPanel.Save",
    "update": "Framework.ActionPanel.Save",
    "delete": "Framework.ActionPanel.Delete",
    "get": "Framework.ActionPanel.Get"
  }
}
