{
  "formId": "quickaction",
  "entity": "QuickAction",
  "title": "Quick Action Definition",
  "idField": "QuickActionId",
  "pages": [
    {
      "pageId": "General",
      "pageName": "General",
      "sections": [
        {
          "sectionId": "GeneralInfo",
          "sectionName": "Quick Action Definition",
          "layout": { "columns": 12 },
          "fields": [
            { "fieldId": "QuickActionId", "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 quick action appears on."
            },
            {
              "fieldId": "ActionCode",
              "label": "Action Code",
              "type": "text",
              "mandatory": true,
              "MaxLength": 100,
              "layout": { "colSpan": 4 },
              "helpText": "Maps to the frontend IQuickAction.actionId; must be unique per MenuId (UK_MQUICKACTION_MENU_CODE)."
            },
            {
              "fieldId": "Label",
              "label": "Label",
              "type": "text",
              "mandatory": true,
              "MaxLength": 200,
              "layout": { "colSpan": 4 }
            },
            {
              "fieldId": "Api",
              "label": "Api (dot-code)",
              "type": "text",
              "mandatory": true,
              "MaxLength": 300,
              "layout": { "colSpan": 8 },
              "helpText": "Any existing GB5 dot-code endpoint, e.g. Framework.Module.MethodName — reuse an existing save endpoint rather than building a new one where possible."
            },
            { "fieldId": "SortOrder", "label": "Sort Order", "type": "number", "DefaultValue": 9999, "layout": { "colSpan": 4 } },
            {
              "fieldId": "FieldsJson",
              "label": "Fields (JSON array)",
              "type": "textarea",
              "mandatory": true,
              "MaxLength": 4000,
              "layout": { "colSpan": 12 },
              "helpText": "IMetaField[] JSON, e.g. [{\"name\":\"Note\",\"type\":\"text\",\"label\":\"Note\"}]. Supported type values: text, number, date, textarea, checkbox, combobox, radio, picklist — see gbmetaquickaction.component.html."
            },
            {
              "fieldId": "VisibleWhen",
              "label": "Visible When (expression, optional)",
              "type": "textarea",
              "MaxLength": 500,
              "layout": { "colSpan": 12 },
              "helpText": "Evaluated against the parent form's live values via MetaformRulesService — currently only evaluated inside the original gbmetaform host; the three newer hosts (GbFormActionComponent/gbgrid/gbreportaction) render this action unconditionally regardless of this expression until that wiring lands. Leave blank to always show."
            },
            {
              "fieldId": "Status",
              "label": "Enabled",
              "type": "checkbox",
              "DefaultValue": 1,
              "layout": { "colSpan": 4 }
            }
          ]
        }
      ]
    }
  ],
  "api": {
    "save": "Framework.QuickAction.Save",
    "update": "Framework.QuickAction.Save",
    "delete": "Framework.QuickAction.Delete",
    "get": "Framework.QuickAction.Get"
  }
}
