将提示发送到智能 Microsoft 365 Copilot 副驾驶®侧面板,导致Copilot代表用户处理和响应。
Syntax
Xrm.Copilot.sendPromptToM365Copilot(promptText, options).then(successCallback, errorCallback);
Parameters
| 参数名称 | 类型 | 必需 | Description |
|---|---|---|---|
promptText |
字符串 | 是的 | 要发送到智能 Microsoft 365 Copilot 副驾驶®侧面板的提示文本。 |
options |
SendPromptToM365CopilotOptions | 否 | 更多选项,例如目标 GPT ID 或自动提交行为。 |
successCallback |
函数 | 是的 | 作成功时要调用的函数。 |
errorCallback |
函数 | 是的 | 作失败时要调用的函数。 |
返回值
类型:Promise<void>
Remarks
如果未启用智能 Microsoft 365 Copilot 副驾驶®,则不执行任何操作。
Example
await Xrm.Copilot.sendPromptToM365Copilot(
"Summarize the recent activity for this account.",
{ gptId: "dddddddd-3333-4444-5555-eeeeeeeeeeee" }
);