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.
Removes the platform-default handlers for a Microsoft 365 Copilot action.
Syntax
Xrm.Copilot.removeDefaultActionHandlers(actionId).then(successCallback, errorCallback);
Parameters
| Parameter Name | Type | Required | Description |
|---|---|---|---|
actionId |
string | Yes | The action ID whose defaults you want to remove. Must be one of the built-in action IDs defined in addActionHandler. |
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
This method doesn't affect custom handlers registered through addActionHandler. To restore the default handlers, use addDefaultActionHandlers. If Microsoft 365 Copilot isn't enabled, this method does nothing.
Example
// Replace default record navigation with custom behavior
await Xrm.Copilot.removeDefaultActionHandlers("MS.PA.CopilotChat.OpenRecord");
await Xrm.Copilot.addActionHandler("MS.PA.CopilotChat.OpenRecord", async ({ entity, recordId }) => {
// custom implementation
});