datai/datai-scenes/datai-scene-salesforce/docs/api-docs/partner-api/PartnerDescribeController/006-describe-quick-actions.md
3111404962 9ec6e3ae66 docs: 为 datai-salesforce-partner 模块创建完整的 API 文档
- 为 6 个 Controller 创建了 28 个接口文档
  * PartnerAdvancedController: 5 个接口
  * PartnerBatchController: 4 个接口
  * PartnerConnectionController: 3 个接口
  * PartnerCrudController: 6 个接口
  * PartnerDescribeController: 6 个接口
  * PartnerQueryController: 4 个接口
- 创建 Partner API 接口文档索引 (index.md) 作为唯一真源
- 每个接口文档包含完整的请求/响应参数、错误码和使用说明
- 文档位置: docs/api-docs/partner-api/
2026-02-02 17:13:00 +08:00

5.5 KiB
Raw Blame History

API 文档 - 描述快速操作

元数据

  • 需求编号001
  • 子需求编号001-01
  • 接口编号006
  • 创建时间2026-02-02
  • 创建人AI Assistant
  • 状态:已完成

接口概述

获取对象的快速操作定义。

基本信息

  • 功能描述:获取对象的快速操作定义
  • 请求方式POST
  • 请求路径/partner/describe/quick-actions
  • 权限要求@PreAuthorize("@ss.hasPermi('partner:describe:quickActions')")

请求参数

请求体JSON

参数名 类型 必填 说明 示例值
objectType String 对象类型(可选,如 Account、Contact Account

请求示例

{
  "objectType": "Account"
}

请求示例(不指定对象类型)

{}

响应参数

参数名 类型 说明
code Integer 状态码200 成功,其他失败)
msg String 提示信息
data Object 响应数据
data.quickActions Array 快速操作描述列表
data.quickActions[].id String 快速操作 ID
data.quickActions[].name String 快速操作名称
data.quickActions[].label String 快速操作标签
data.quickActions[].type String 快速操作类型Create、Update、Custom
data.quickActions[].actionType String 操作类型Create、Update、Delete
data.quickActions[].targetObject String 目标对象
data.quickActions[].targetParentField String 目标父字段
data.quickActions[].url String 快速操作 URL
data.quickActions[].iconUrl String 图标 URL
data.quickActions[].custom Boolean 是否为自定义快速操作
data.quickActions[].standard Boolean 是否为标准快速操作
data.success Boolean 是否成功
data.errors Array 错误信息列表

成功响应示例(指定对象类型)

{
  "code": 200,
  "msg": "操作成功",
  "data": {
    "quickActions": [
      {
        "id": "01ixx0000000001AAA",
        "name": "NewAccount",
        "label": "New Account",
        "type": "Create",
        "actionType": "Create",
        "targetObject": "Account",
        "targetParentField": null,
        "url": "/001/e",
        "iconUrl": "/img/icon/account16.png",
        "custom": false,
        "standard": true
      },
      {
        "id": "01ixx0000000002AAA",
        "name": "LogACall",
        "label": "Log a Call",
        "type": "Update",
        "actionType": "Update",
        "targetObject": "Task",
        "targetParentField": "WhatId",
        "url": "/00T/e",
        "iconUrl": "/img/icon/task16.png",
        "custom": false,
        "standard": true
      },
      {
        "id": "01ixx0000000003AAA",
        "name": "SendEmail",
        "label": "Send Email",
        "type": "Custom",
        "actionType": "Custom",
        "targetObject": null,
        "targetParentField": null,
        "url": "/_ui/core/email/author/EmailAuthor?p2_lkid={!Account.Id}",
        "iconUrl": "/img/icon/email16.png",
        "custom": true,
        "standard": false
      }
    ],
    "success": true,
    "errors": null
  }
}

成功响应示例(不指定对象类型)

{
  "code": 200,
  "msg": "操作成功",
  "data": {
    "quickActions": [
      {
        "id": "01ixx0000000001AAA",
        "name": "NewAccount",
        "label": "New Account",
        "type": "Create",
        "actionType": "Create",
        "targetObject": "Account",
        "targetParentField": null,
        "url": "/001/e",
        "iconUrl": "/img/icon/account16.png",
        "custom": false,
        "standard": true
      },
      {
        "id": "01ixx0000000004AAA",
        "name": "NewContact",
        "label": "New Contact",
        "type": "Create",
        "actionType": "Create",
        "targetObject": "Contact",
        "targetParentField": null,
        "url": "/003/e",
        "iconUrl": "/img/icon/contact16.png",
        "custom": false,
        "standard": true
      }
    ],
    "success": true,
    "errors": null
  }
}

失败响应示例

{
  "code": 500,
  "msg": "描述快速操作失败",
  "data": {
    "quickActions": null,
    "success": false,
    "errors": [
      {
        "statusCode": "INVALID_TYPE",
        "message": "Invalid object type: InvalidObject"
      }
    ]
  }
}

错误码

错误码 说明 处理建议
200 操作成功 -
400 请求参数错误 检查请求参数格式和必填项
401 未登录或登录已过期 请重新登录
403 无权限访问 请检查用户权限
500 服务器内部错误 请联系管理员或稍后重试

注意事项

  1. 如果不指定 objectType则返回所有快速操作
  2. 指定 objectType 则只返回该对象的快速操作
  3. 快速操作类型包括Create、Update、Delete、Custom 等
  4. 自定义快速操作的 custom 字段为 true
  5. 某些快速操作可能因为权限限制不可访问
  6. 快速操作列表可能很大,建议缓存结果

使用场景

  • 获取对象的快速操作
  • 动态生成快速操作菜单
  • 验证快速操作是否存在
  • 构建自定义快速操作
  • 权限检查和验证

相关文档