Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
- This is a preview feature.
- Preview features aren’t meant for production use and might have restricted functionality. These features are subject to supplemental terms of use, and are available before an official release so that customers can get early access and provide feedback.
(preview) 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>"
});