Nóta
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as shíniú isteach nó eolairí a athrú.
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as eolairí a athrú.
Sends updated app context to the Microsoft Copilot side panel.
Syntax
Xrm.Copilot.updateContext(context).then(successCallback, errorCallback);
Parameters
| Parameter Name | Type | Required | Description |
|---|---|---|---|
context |
PowerAppsContent | Yes | An object describing the current app context to send to the Microsoft Copilot side panel. |
successCallback |
Function | Yes | A function to call when the operation succeeds. |
errorCallback |
Function | Yes | A function to call when the operation fails. |
Return Value
Type: Promise<void>
Remarks
The API automatically merges base context fields (appId, appType, orgId, geo, schemaVersion). You don't need to provide these fields. The API does nothing if Microsoft Copilot isn't enabled. Agents you author can't yet use context to optimize their responses.
Example
await Xrm.Copilot.updateContext({
entity: "account",
filterXML: "<fetch><entity name='account'><filter><condition attribute='statecode' operator='eq' value='0'/></filter></entity></fetch>"
});