Nóta
Aðgangur að þessari síðu krefst heimildar. Þú getur prófað aðskrá þig inn eða breyta skráasöfnum.
Aðgangur að þessari síðu krefst heimildar. Þú getur prófað að breyta skráasöfnum.
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>"
});