Note
Kailangan ng pahintulot para ma-access ang page na ito. Maaari mong subukang mag-sign in o magpalit ng mga direktoryo.
Ang pag-access sa pahinang ito ay nangangailangan ng pahintulot. Maaari mong subukang baguhin ang mga direktoryo.
Removes a previously registered custom handler for a Microsoft 365 Copilot action.
Syntax
Xrm.Copilot.removeActionHandler(actionId, actionHandler).then(successCallback, errorCallback);
Parameters
| Parameter Name | Type | Required | Description |
|---|---|---|---|
actionId |
string | Yes | The unique identifier of the action. |
actionHandler |
Function | Yes | The handler to remove. Must be the same function reference passed to 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
The method removes only the specific function reference you pass. It doesn't affect other handlers for the same actionId. If Microsoft 365 Copilot isn't enabled, the method does nothing.
Example
const handler = async (data) => { /* ... */ };
await Xrm.Copilot.addActionHandler("My.Namespace.MyActionMessage", handler);
// Later, when no longer needed:
await Xrm.Copilot.removeActionHandler("My.Namespace.MyActionMessage", handler);