Important
- 这是一项预览功能。
- 预览功能不适用于生产用途,并且可能具有受限功能。 这些功能受补充使用条款约束,在正式发布之前已经可用,以便客户可以及早使用并提供反馈。
(预览版)将更新的应用上下文发送到智能 Microsoft 365 Copilot 副驾驶®侧面板。
Syntax
Xrm.Copilot.updateContext(context).then(successCallback, errorCallback);
Parameters
| 参数名称 | 类型 | 必需 | Description |
|---|---|---|---|
context |
PowerAppsContent | 是的 | 描述要发送到智能 Microsoft 365 Copilot 副驾驶®侧面板的当前应用上下文的对象。 |
successCallback |
函数 | 是的 | 作成功时要调用的函数。 |
errorCallback |
函数 | 是的 | 作失败时要调用的函数。 |
返回值
类型:Promise<void>
Remarks
API 自动合并基本上下文字段(appId、、appTypeorgId、geoschemaVersion)。 无需提供这些字段。 如果未启用智能 Microsoft 365 Copilot 副驾驶®,API 将不执行任何操作。 你创作的代理尚无法使用上下文来优化其响应。
Example
await Xrm.Copilot.updateContext({
entity: "account",
filterXML: "<fetch><entity name='account'><filter><condition attribute='statecode' operator='eq' value='0'/></filter></entity></fetch>"
});