Notiz
Zougrëff op dës Säit erfuerdert Autorisatioun. Dir kënnt probéieren, Iech unzemellen oder Verzeechnesser ze änneren.
Zougrëff op dës Säit erfuerdert Autorisatioun. Dir kënnt probéieren, Verzeechnesser ze änneren.
Sends updated app context to the Microsoft 365 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 365 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 365 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>"
});