表单
该分类包含 70 条以 system.form. 开头的 Runtime 系统命令。
1. 列出表单结构
完整命令:system.form.schema.list
列出表单结构。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form schema list \
[--keyword value] [--cursor value] [--limit n] [--json]
参数:无(除 --json 等通用选项外)。
2. 获取表单结构
完整命令:system.form.schema.get
获取表单结构资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form schema get --form-api-name <apiName> [--json]
参数:无(除 --json 等通用选项外)。
3. 创建表单结构
完整命令:system.form.schema.create
创建新的业务表单定义。 · 风险:写入
sl system form schema create \
--name <name> --api-name <apiName> --type <type> [--description value] \
[--icon value] [--version value] [--json]
参数:无(除 --json 等通用选项外)。
4. 复制表单结构
完整命令:system.form.schema.copy
复制表单结构资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:写入
sl system form schema copy \
--source-form-id <uuid> --name <name> --api-name <apiName> \
[--description value] [--icon value] \
[--field-api-name-mode preserve|regenerate] [--json]
参数:无(除 --json 等通用选项外)。
5. 更新表单结构
完整命令:system.form.schema.update
更新表单结构资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:写入
sl system form schema update \
--form-id <uuid> [--name value] [--description value] [--icon value] \
[--version value] [--custom-config-json json] [--json]
参数:无(除 --json 等通用选项外)。
6. 启用表单结构
完整命令:system.form.schema.enable
启用表单结构资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:写入
sl system form schema enable --form-id <uuid> [--json]
参数:无(除 --json 等通用选项外)。
7. 停用表单结构
完整命令:system.form.schema.disable
停用表单结构资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:写入
sl system form schema disable --form-id <uuid> [--json]
参数:无(除 --json 等通用选项外)。
8. 删除表单结构
完整命令:system.form.schema.delete
删除表单结构资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:写入
sl system form schema delete --form-id <uuid> [--operation-id <uuid>] [--json]
formId(必填)是表单 UUID。表单须已停用,内置受保护表单及被消息模板引用的表单不可删除,并要求表单模型调整权限。
此命令返回后台操作状态。用返回的 operationId 调用 system.operation.get,直到状态为 completed、failed 或 cancelled;删除结果位于 result.deleted。operationId 可通过 --operation-id 指定。若提交响应丢失,必须复用同一 ID 和同一输入重试,不能生成新 ID 重复删除。
9. 列出字段
完整命令:system.form.field.list
列出表单字段。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form field list \
--form-id <uuid> [--keyword value] [--cursor value] [--limit n] \
[--json]
参数:无(除 --json 等通用选项外)。
10. 搜索字段
完整命令:system.form.field.search
搜索表单字段。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form field search \
[--keyword value] [--form-limit n] [--field-limit n] [--json]
参数:无(除 --json 等通用选项外)。
11. 获取字段
完整命令:system.form.field.get
获取表单字段资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form field get --field-id <uuid> [--json]
参数:无(除 --json 等通用选项外)。
12. 创建字段
完整命令:system.form.field.create
创建表单字段资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:写入
sl system form field create \
--form-id <uuid> --definition-json json [--json]
参数:无(除 --json 等通用选项外)。
公式配置必须提供非空表达式:动态公式使用 config.dynamicFormula.formulaExpression,公式默认值使用 defaultValue.formulaExpression 并设置 defaultValue.mode 为 formula。缺少表达式时返回 FORMS_FIELD_FORMULA_EXPRESSION_REQUIRED。
13. 更新字段
完整命令:system.form.field.update
更新表单字段资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:写入
sl system form field update \
--field-id <uuid> --definition-json json [--json]
参数:无(除 --json 等通用选项外)。
公式配置必须提供非空表达式:动态公式使用 config.dynamicFormula.formulaExpression,公式默认值使用 defaultValue.formulaExpression 并设置 defaultValue.mode 为 formula。缺少表达式时返回 FORMS_FIELD_FORMULA_EXPRESSION_REQUIRED。
14. 删除字段
完整命令:system.form.field.delete
删除表单字段资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:写入
sl system form field delete --field-id <uuid> [--json]
参数:无(除 --json 等通用选项外)。
15. 获取字段脚本绑定
完整命令:system.form.field.script-binding.get
获取表单字段脚本绑定资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form field script-binding get \
--asset-id <uuid> (--form-id <uuid>|--form-api-name value) \
(--field-id <uuid>|--field-api-name value) [--json]
参数:
studioAssetId(必填)— Published Studio script asset UUIDformApiName(必填)— Form API name containing the target fieldfieldApiName(必填)— Field API name in the form; must match the so_* format
16. 绑定字段脚本绑定
完整命令:system.form.field.script-binding.bind
绑定表单字段脚本绑定资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:写入
sl system form field script-binding bind \
--asset-id <uuid> --file-path value \
(--form-id <uuid>|--form-api-name value) \
(--field-id <uuid>|--field-api-name value) [--json]
参数:
studioAssetId(必填)— Published Studio script asset UUIDstudioFilePath(必填)— Published Studio script file pathformApiName(必填)— Form API name containing the target fieldfieldApiName(必填)— Field API name in the form; must match the so_* format
17. 解除绑定字段脚本绑定
完整命令:system.form.field.script-binding.unbind
解除绑定表单字段脚本绑定资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:写入
sl system form field script-binding unbind \
--asset-id <uuid> --file-path value \
(--form-id <uuid>|--form-api-name value) \
(--field-id <uuid>|--field-api-name value) [--json]
参数:
studioAssetId(必填)— Published Studio script asset UUIDstudioFilePath(必填)— Published Studio script file pathformApiName(必填)— Form API name containing the target fieldfieldApiName(必填)— Field API name in the form; must match the so_* format
18. 验证字段脚本绑定
完整命令:system.form.field.script-binding.verify
验证表单字段脚本绑定资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form field script-binding verify \
--asset-id <uuid> --file-path value \
(--form-id <uuid>|--form-api-name value) \
(--field-id <uuid>|--field-api-name value) [--json]
参数:
studioAssetId(必填)— Published Studio script asset UUIDstudioFilePath(必填)— Published Studio script file pathformApiName(必填)— Form API name containing the target fieldfieldApiName(必填)— Field API name in the form; must match the so_* format
19. 同步目录公式
完整命令:system.form.formula.catalog
同步目录表单公式资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form formula catalog [--json]
参数:无(除 --json 等通用选项外)。
20. 校验公式
完整命令:system.form.formula.validate
校验表单公式资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form formula validate \
--form-id <uuid> --expression <formula> \
--result-data-type string|number|boolean|date|datetime|array|object \
[--json]
参数:无(除 --json 等通用选项外)。
21. 预览公式
完整命令:system.form.formula.preview
预览表单公式资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form formula preview \
--form-id <uuid> --expression <formula> \
--result-data-type string|number|boolean|date|datetime|array|object \
--values-json '{"so_field":value}' [--json]
参数:无(除 --json 等通用选项外)。
22. 列出布局
完整命令:system.form.layout.list
列出表单布局。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form layout list \
--form-id <uuid> [--keyword value] [--cursor value] [--limit n] \
[--json]
参数:
formId(必填)— Existing form UUID discovered with system.form.schema commandskeyword(可选)— Case-insensitive layout-name filtercursor(可选)— Opaque cursor returned by the previous list calllimit(可选)— Maximum items to return from 1 to 100; defaults to 20
23. 获取布局
完整命令:system.form.layout.get
获取表单布局资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form layout get --layout-id <uuid> [--json]
参数:
layoutId(必填)— Existing layout UUID returned by layout list
24. 创建布局
完整命令:system.form.layout.create
创建表单布局资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:写入
sl system form layout create \
--form-id <uuid> (--definition-json json|--definition-file path) \
[--json]
参数:
formId(必填)— Existing form UUID discovered with system.form.schema commandsdefinition(必填)— Custom-layout definition described by layoutConfiguration
25. 更新布局
完整命令:system.form.layout.update
更新表单布局资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:写入
sl system form layout update \
--layout-id <uuid> (--definition-json json|--definition-file path) \
[--json]
参数:
layoutId(必填)— Existing layout UUID returned by layout listdefinition(必填)— Exactly one metadata or full canvas section described by layoutConfiguration
26. 删除布局
完整命令:system.form.layout.delete
删除表单布局资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:写入
sl system form layout delete --layout-id <uuid> [--json]
参数:
layoutId(必填)— Existing custom layout UUID; DEFAULT cannot be deleted
27. 获取布局页面事件
完整命令:system.form.layout.page-event.get
获取表单布局页面事件资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form layout page-event get \
--asset-id <uuid> (--form-id <uuid>|--form-api-name value) \
--layout-id <uuid> [--json]
参数:
studioAssetId(必填)— Published Studio script asset UUIDformId|formApiName(必填)— Form UUID or API namelayoutId(必填)— Custom NEW or EDIT layout UUID
28. 绑定布局页面事件
完整命令:system.form.layout.page-event.bind
绑定表单布局页面事件资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:写入
sl system form layout page-event bind \
--asset-id <uuid> --file-path value \
(--form-id <uuid>|--form-api-name value) --layout-id <uuid> \
--event-type main-init|main-field-change|child-row-add|child-field-change|child-row-remove \
[--child-table-api-name value] [--field-mode all|specified] \
[--fields-json json] [--json]
参数:
studioAssetId(必填)— Published Studio script asset UUIDstudioFilePath(必填)— Published Studio script file pathformId|formApiName(必填)— Form UUID or API namelayoutId(必填)— Custom layout UUIDeventType(必填)— main-init, main-field-change, child-row-add, child-field-change, or child-row-remove
29. 解除绑定布局页面事件
完整命令:system.form.layout.page-event.unbind
解除绑定表单布局页面事件资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:写入
sl system form layout page-event unbind \
--asset-id <uuid> --file-path value \
(--form-id <uuid>|--form-api-name value) --layout-id <uuid> \
--event-type main-init|main-field-change|child-row-add|child-field-change|child-row-remove \
[--child-table-api-name value] [--field-mode all|specified] \
[--fields-json json] [--json]
参数:
studioAssetId(必填)— Published Studio script asset UUIDstudioFilePath(必填)— Published Studio script file pathformId|formApiName(必填)— Form UUID or API namelayoutId(必填)— Custom layout UUIDeventType(必填)— The event target to remove
30. 验证布局页面事件
完整命令:system.form.layout.page-event.verify
验证表单布局页面事件资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form layout page-event verify \
--asset-id <uuid> --file-path value \
(--form-id <uuid>|--form-api-name value) --layout-id <uuid> \
--event-type main-init|main-field-change|child-row-add|child-field-change|child-row-remove \
[--child-table-api-name value] [--field-mode all|specified] \
[--fields-json json] [--json]
参数:
studioAssetId(必填)— Published Studio script asset UUIDstudioFilePath(必填)— Published Studio script file pathformId|formApiName(必填)— Form UUID or API namelayoutId(必填)— Custom layout UUIDeventType(必填)— The event target to verify
31. 列出打印模板
完整命令:system.form.print-template.list
列出表单打印模板。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form print-template list \
--form-id <uuid> [--keyword value] [--status enabled|disabled] \
[--visible-to-actor] [--cursor value] [--limit n] [--json]
参数:
formId(必填)— Existing form UUID from system.form.schema.listcursor|limit(可选)— Opaque nextCursor and a 1-100 result limitkeyword|enabled(可选)— Optional name/description search and enabled filtervisibleToActor(可选)— When true, retain only templates whose enabled scope matches the current actor
32. 获取打印模板
完整命令:system.form.print-template.get
获取表单打印模板资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form print-template get --template-id <uuid> [--json]
参数:
templateId(必填)— Template UUID returned by print-template.list
33. 创建打印模板
完整命令:system.form.print-template.create
创建表单打印模板资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:写入
sl system form print-template create \
--form-id <uuid> (--definition-json json|--definition-file path) \
[--json]
参数:
formId(必填)— Target form UUIDname(必填)— Template name, 1-200 charactersdescription|enabled|priority(可选)— Metadata and selection priority. Higher priority winsfollowTemplateId(可选)— Template in the same form to inherit structure from; nested inheritance is forbiddenlayout|scopes(可选)— Typed page-region layout and complete visibility scopes
34. 更新打印模板
完整命令:system.form.print-template.update
更新表单打印模板资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:写入
sl system form print-template update \
--template-id <uuid> --expected-revision <n> \
(--definition-json json|--definition-file path) [--json]
参数:
templateId(必填)— Template UUIDexpectedRevision(必填)— Revision returned by get; stale revisions are rejectedchanges(必填)— At least one metadata, inheritance, layout, background, or scope change
35. 删除打印模板
完整命令:system.form.print-template.delete
删除表单打印模板资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:高风险
sl system form print-template delete \
--template-id <uuid> --expected-revision <n> [--json]
参数:
templateId(必填)— Non-system template UUIDexpectedRevision(必填)— Revision returned by get; stale revisions are rejected
36. 解析打印模板
完整命令:system.form.print-template.resolve
解析表单打印模板资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form print-template resolve --form-id <uuid> [--json]
参数:
formId(必填)— Form UUIDprintType(可选)— DEFAULT when omitted. Resolves scope, priority, and effective inheritance
37. 获取打印设计上下文
完整命令:system.form.print-design.context.get
获取表单打印设计上下文资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form print-design context get \
(--session-id <uuid>|--form-id <uuid> [--template-id <uuid>] [--active-page-id <uuid>]) \
[--json]
参数:
sessionId(可选)— Resume an unexpired authoritative design sessionformId(可选)— Required when creating a session; mutually exclusive with sessionIdtemplateId(可选)— Existing template to edit. Omit to create a new templateactivePageId(可选)— Existing page UUID to focus. The Runtime verifies it against the template
38. 校验打印设计补丁
完整命令:system.form.print-design.patch.validate
校验表单打印设计补丁资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form print-design patch validate \
--session-id <uuid> (--definition-json json|--definition-file path) \
[--json]
参数:
sessionId(必填)— Session returned by context.getpatch(必填)— Complete strict semantic patch. Read-only validation materializes the final canvas and returns exact diagnostics before approval
39. 执行打印设计补丁
完整命令:system.form.print-design.patch.execute
执行表单打印设计补丁资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:写入
sl system form print-design patch execute \
--session-id <uuid> --base-revision <n> --idempotency-key <key> \
(--definition-json json|--definition-file path) [--json]
参数:
sessionId(必填)— Same session used for validationbaseRevision(必填)— Unchanged session revision used for validationidempotencyKey(必填)— Stable caller key; retry the same patch with the same keypatch(必填)— The normalized patch returned by patch.validate, unchanged
40. 获取运行时列表元数据
完整命令:system.form.runtime.list-metadata.get
获取表单运行时列表元数据资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form runtime list-metadata get \
--form-api-name <apiName> [--layout-page-type LIST|RELATION] [--json]
参数:无(除 --json 等通用选项外)。
41. 获取运行时列表初始化数据
完整命令:system.form.runtime.list-bootstrap.get
获取表单运行时列表初始化数据资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form runtime list-bootstrap get \
(--definition-json json|--definition-file path) [--json]
参数:无(除 --json 等通用选项外)。
42. 获取运行时视图初始化数据
完整命令:system.form.runtime.view-bootstrap.get
获取表单运行时视图初始化数据资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form runtime view-bootstrap get \
(--definition-json json|--definition-file path) [--json]
参数:无(除 --json 等通用选项外)。
43. 获取运行时编辑器初始化数据
完整命令:system.form.runtime.editor-bootstrap.get
获取表单运行时编辑器初始化数据资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form runtime editor-bootstrap get \
(--definition-json json|--definition-file path) [--json]
参数:无(除 --json 等通用选项外)。
44. 列出运行时已保存筛选
完整命令:system.form.runtime.saved-filter.list
列出表单运行时已保存筛选。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form runtime saved-filter list --form-id <uuid> [--json]
参数:无(除 --json 等通用选项外)。
45. 保存运行时已保存筛选
完整命令:system.form.runtime.saved-filter.save
保存表单运行时已保存筛选资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:写入
sl system form runtime saved-filter save \
(--definition-json json|--definition-file path) [--json]
参数:无(除 --json 等通用选项外)。
46. 删除运行时已保存筛选
完整命令:system.form.runtime.saved-filter.delete
删除表单运行时已保存筛选资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:写入
sl system form runtime saved-filter delete --filter-id <uuid> [--json]
参数:无(除 --json 等通用选项外)。
47. 列出运行时表格视图
完整命令:system.form.runtime.table-view.list
列出表单运行时表格视图。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form runtime table-view list --form-id <uuid> [--json]
参数:无(除 --json 等通用选项外)。
48. 保存运行时表格视图
完整命令:system.form.runtime.table-view.save
保存表单运行时表格视图资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:写入
sl system form runtime table-view save \
(--definition-json json|--definition-file path) [--json]
参数:无(除 --json 等通用选项外)。
49. 删除运行时表格视图
完整命令:system.form.runtime.table-view.delete
删除表单运行时表格视图资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:写入
sl system form runtime table-view delete --view-id <uuid> [--json]
参数:无(除 --json 等通用选项外)。
50. 列出记录
完整命令:system.form.record.list
列出表单记录。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form record list \
--form-api-name <apiName> [--keyword value] [--keywords-json json] \
[--search-field-api-name value] \
[--data-status draft|active|archived|trashed] \
[--approval-status none|pending|approved|rejected|returned|canceled] \
[--visibility-states-json json] [--condition-json json] \
[--sort-field-api-name value] [--sort-direction asc|desc] \
[--cursor value] [--limit n] [--include-detail] [--json]
参数:无(除 --json 等通用选项外)。
51. 获取记录
完整命令:system.form.record.get
获取表单记录资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form record get --record-id <uuid> [--json]
参数:无(除 --json 等通用选项外)。
52. 聚合记录
完整命令:system.form.record.aggregate
聚合表单记录资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form record aggregate \
(--definition-json json|--definition-file path) [--json]
参数:无(除 --json 等通用选项外)。
53. 列出记录权限主体
完整命令:system.form.record.permission-subject.list
列出表单记录权限主体。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form record permission-subject list \
--record-id <uuid> [--cursor value] [--limit n] [--json]
参数:无(除 --json 等通用选项外)。
54. 保存记录(含子表)
完整命令:system.form.record.save-with-child-tables
保存表单记录。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 Runtime 会检查对应的按钮权限并执行配置的前置/后置脚本(包含每个子表写入);前置脚本失败会阻止整个事务。请检查 afterScript 与 childScripts:后置脚本失败不会回滚已提交数据,也不要因此重复写入。删除请使用 preset:detail.delete 或 preset:listBatch.delete,不要在更新里把 dataStatus 置为 trashed。提交审批由服务端配置决定。 · 风险:写入
sl system form record save-with-child-tables \
(--definition-json json|--definition-file path) [--json]
参数:无(除 --json 等通用选项外)。
55. 复制记录
完整命令:system.form.record.copy
复制表单记录资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 Runtime 会检查对应的按钮权限并执行配置的前置/后置脚本(包含每个子表写入);前置脚本失败会阻止整个事务。请检查 afterScript 与 childScripts:后置脚本失败不会回滚已提交数据,也不要因此重复写入。删除请使用 preset:detail.delete 或 preset:listBatch.delete,不要在更新里把 dataStatus 置为 trashed。提交审批由服务端配置决定。 · 风险:写入
sl system form record copy \
--record-id <uuid> [--title value] \
[--data-status draft|active|archived] [--exclude-child-tables] \
[--submit-approval] [--json]
参数:无(除 --json 等通用选项外)。
56. 创建记录批次
完整命令:system.form.record.batch.create
创建表单记录批次资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 Runtime 会检查对应的按钮权限并执行配置的前置/后置脚本(包含每个子表写入);前置脚本失败会阻止整个事务。请检查 afterScript 与 childScripts:后置脚本失败不会回滚已提交数据,也不要因此重复写入。删除请使用 preset:detail.delete 或 preset:listBatch.delete,不要在更新里把 dataStatus 置为 trashed。提交审批由服务端配置决定。 · 风险:写入
sl system form record batch create \
--form-api-name <apiName> --button-key preset:form.submit \
--records-json '[{"title":"title","data":{}}]' [--json]
参数:无(除 --json 等通用选项外)。
57. 批量创建记录(含子表)
完整命令:system.form.record.batch.create-with-child-tables
创建表单记录批次。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 Runtime 会检查对应的按钮权限并执行配置的前置/后置脚本(包含每个子表写入);前置脚本失败会阻止整个事务。请检查 afterScript 与 childScripts:后置脚本失败不会回滚已提交数据,也不要因此重复写入。删除请使用 preset:detail.delete 或 preset:listBatch.delete,不要在更新里把 dataStatus 置为 trashed。提交审批由服务端配置决定。 · 风险:写入
sl system form record batch create-with-child-tables \
--form-api-name <apiName> --button-key preset:form.submit \
--records-json '[{"title":"title","data":{},"childTables":[{"childFormApiName":"order_items","records":[{"title":"item","data":{}}]}]}]' \
[--json]
参数:无(除 --json 等通用选项外)。
58. 更新记录批次
完整命令:system.form.record.batch.update
更新表单记录批次资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 Runtime 会检查对应的按钮权限并执行配置的前置/后置脚本(包含每个子表写入);前置脚本失败会阻止整个事务。请检查 afterScript 与 childScripts:后置脚本失败不会回滚已提交数据,也不要因此重复写入。删除请使用 preset:detail.delete 或 preset:listBatch.delete,不要在更新里把 dataStatus 置为 trashed。提交审批由服务端配置决定。 · 风险:写入
sl system form record batch update \
--form-api-name <apiName> --button-key preset:form.save \
--records-json '[{"recordId":"uuid","data":{}}]' [--json]
参数:无(除 --json 等通用选项外)。
59. 清理记录
完整命令:system.form.record.cleanup
清理表单记录资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:写入
sl system form record cleanup \
--form-api-name <apiName> --mode restore|purge [--keyword value] \
[--keywords-json json] [--search-field-api-name value] \
[--visibility-states-json json] [--condition-json json] \
[--excluded-record-ids-json json] [--json]
参数:无(除 --json 等通用选项外)。
60. 列出按钮
完整命令:system.form.button.list
仅在只读的 Runtime 探查确定了权威的表单 apiName 与记录 ID 后,列出已配置的按钮。组织架构内置表单使用 formApiName organization、department 或 member,并配合所选 PROFILE 扩展的 formRecordId;不要臆造带前缀的表单名,也不要使用目录实体的 ID。 · 风险:读取
sl system form button list \
--form-api-name <apiName> [--scope LIST|VIEW|NEW|EDIT] \
[--record-id <uuid>] [--json]
参数:无(除 --json 等通用选项外)。
61. 执行按钮
完整命令:system.form.button.execute
执行 system.form.button.list 返回的同表单、同记录范围内某个精确按钮。组织架构写入使用 formApiName organization、department 或 member 及 PROFILE 扩展的 formRecordId。转发记录到对话使用 preset:detail.forward(recordId)或 preset:listBatch.forward(recordIds),并传 {targetMemberIds, clientBatchId};收件人用 system.organization.structure.member.list 解析,名称有歧义时必须澄清。服务端生成记录链接并校验按钮与读取权限。 Runtime 会检查对应的按钮权限并执行配置的前置/后置脚本(包含每个子表写入);前置脚本失败会阻止整个事务。请检查 afterScript 与 childScripts:后置脚本失败不会回滚已提交数据,也不要因此重复写入。删除请使用 preset:detail.delete 或 preset:listBatch.delete,不要在更新里把 dataStatus 置为 trashed。提交审批由服务端配置决定。 · 风险:写入
sl system form button execute \
--form-api-name <apiName> --button-key <preset:key|custom:id> \
[--payload-json '{"recordId":"uuid","draft":{"title":"title","data":{}},"input":{}}'] \
[--json]
Forward buttons: preset:detail.forward requires recordId; preset:listBatch.forward requires recordIds; input requires targetMemberIds (member UUIDs) and clientBatchId (retry UUID).
参数:无(除 --json 等通用选项外)。
62. 获取按钮设计
完整命令:system.form.button.design.get
获取表单按钮设计资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form button design get \
(--form-id <uuid>|--form-api-name value) [--json]
参数:
formId|formApiName(必填)— Exactly one form target
63. 更新按钮设计
完整命令:system.form.button.design.update
更新表单按钮设计资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:写入
sl system form button design update \
(--form-id <uuid>|--form-api-name value) --definition-json json \
[--json]
参数:
formId|formApiName(必填)— Exactly one form targetformActionButtons(必填)— Full replacement custom button array. Read it first with design.getpresetActionButtons(必填)— Full replacement preset override array. Read it first with design.get
64. 创建自定义按钮设计
完整命令:system.form.button.design.custom.create
创建表单按钮设计自定义资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:写入
sl system form button design custom create \
(--form-id <uuid>|--form-api-name value) --definition-json json \
[--json]
参数:
formId|formApiName(必填)— Exactly one form targetlabel(必填)— Button labelplacement(必填)— One supported button placementbuttonType(可选)— Defaults to taskaction(可选)— Defaults to an unbound script action. An interaction button must provide a studioPage action with studioPageAssetIdscopes(可选)— Defaults to the scopes allowed by placementorder(可选)— Defaults to the next order in the placementenabled(可选)— Defaults to truedisplayMode(可选)— exposed or collapsed; defaults to exposedvariant(可选)— Optional visual variantcolor(可选)— Optional button color
65. 更新自定义按钮设计
完整命令:system.form.button.design.custom.update
更新表单按钮设计自定义资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:写入
sl system form button design custom update \
--button-id <uuid> (--form-id <uuid>|--form-api-name value) \
--definition-json json [--json]
参数:
formId|formApiName(必填)— Exactly one form targetbuttonId(必填)— Existing custom button idaction(可选)— Complete replacement action when changing the action type
66. 删除自定义按钮设计
完整命令:system.form.button.design.custom.delete
删除表单按钮设计自定义资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:写入
sl system form button design custom delete \
--button-id <uuid> (--form-id <uuid>|--form-api-name value) [--json]
参数:
formId|formApiName(必填)— Exactly one form targetbuttonId(必填)— Existing custom button id
67. 获取按钮脚本绑定
完整命令:system.form.button.script-binding.get
获取表单按钮脚本绑定资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form button script-binding get \
--asset-id <uuid> (--form-id <uuid>|--form-api-name value) [--json]
参数:
studioAssetId(必填)— Published Studio script asset UUIDformId|formApiName(必填)— Form UUID or API name
68. 绑定按钮脚本绑定
完整命令:system.form.button.script-binding.bind
绑定表单按钮脚本绑定资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:写入
sl system form button script-binding bind \
--asset-id <uuid> --file-path value \
(--form-id <uuid>|--form-api-name value) \
--button-key preset:key|custom:id \
--phase beforeClick|action|afterClick [--json]
参数:
studioAssetId(必填)— Published Studio script asset UUIDstudioFilePath(必填)— Published Studio script file pathformId|formApiName(必填)— Form UUID or API namebuttonKey(必填)— preset:key or custom:idphase(必填)— beforeClick, action, or afterClick
69. 解除绑定按钮脚本绑定
完整命令:system.form.button.script-binding.unbind
解除绑定表单按钮脚本绑定资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:写入
sl system form button script-binding unbind \
--asset-id <uuid> --file-path value \
(--form-id <uuid>|--form-api-name value) \
--button-key preset:key|custom:id \
--phase beforeClick|action|afterClick [--json]
参数:
studioAssetId(必填)— Published Studio script asset UUIDstudioFilePath(必填)— Published Studio script file pathformId|formApiName(必填)— Form UUID or API namebuttonKey(必填)— preset:key or custom:idphase(必填)— beforeClick, action, or afterClick
70. 验证按钮脚本绑定
完整命令:system.form.button.script-binding.verify
验证表单按钮脚本绑定资源。此租户级 Runtime 命令会按已注册的命令 schema 校验输入。 · 风险:读取
sl system form button script-binding verify \
--asset-id <uuid> --file-path value \
(--form-id <uuid>|--form-api-name value) \
--button-key preset:key|custom:id \
--phase beforeClick|action|afterClick [--json]
参数:
studioAssetId(必填)— Published Studio script asset UUIDstudioFilePath(必填)— Published Studio script file pathformId|formApiName(必填)— Form UUID or API namebuttonKey(必填)— preset:key or custom:idphase(必填)— beforeClick, action, or afterClick
71. 批量导入字段
完整命令:system.form.field.batch-import · 风险:写入
sl system form field batch-import --form-id <uuid> \
(--definition-json json|--definition-file path) [--json]
定义 JSON 包含 rows(1–200 行)。每行必填 name、apiName、type、required、readonly、disabled、hidden 和 options;非选项字段的 options 为 null,选项字段填写 {label, value} 数组。可选 fieldId 用于更新已有字段;未提供时按 apiName 匹配,未匹配则创建。关联字段可指定 targetFormId,新建关联字段必须提供目标表单。
导入支持基础字段,不支持动态公式等计算字段。已有字段不能通过导入修改 API 名称或类型,默认字段不可更新;必填字段不可停用。任意一行失败则整批回滚。返回 createdCount 和 updatedCount。
fields.json:
{
"rows": [{
"name": "Job Title",
"apiName": "so_job_title",
"type": "autocomplete",
"required": false,
"readonly": false,
"disabled": false,
"hidden": false,
"options": [{ "label": "Designer", "value": "Designer" }]
}]
}
普通字段 options 填 null;辅助文本的 label 和 value 相同。新建关联搜索、多选关联、外键时填写 targetFormId;更新时可省略以保留现有关联配置。也可使用 --definition-json 直接传入 JSON。
72. 导出字段
完整命令:system.form.field.export · 风险:读取
sl system form field export --form-id <uuid> [--json]
formId(必填)是表单 UUID。导出字段设计数据用于检查或准备批量导入;批量导入仍须遵守其字段类型与行格式限制。