Edit

setClickToAct (JavaScript API Reference) for Dynamics 365 Channel Integration Framework 2.0

Note

This API will be deprecated on October 31, 2025. If you need to change outbound configuration for your channel provider, review Enable outbound communication (ClickToAct) in Dynamics 365 Channel Integration Framework 2.0.

Sets a Boolean value to enable or disable the outbound communication (ClickToAct). You must have the msdyn_writechannelprovider privilege to use this API. More information: Security roles and privileges.

Syntax

Microsoft.CIFramework.setClickToAct(value).then(successCallback, errorCallback);

Parameters

Name Type Required Description
value Boolean Yes Sets the value to enable or disable ClickToAct.
successCallback Function No A function to call when the request is successful.
errorCallback Function No A function to call when the request fails.

Return value

A Promise object with a null value if the request is successful. The API returns an error if the request fails.

Examples


// To disable outbound communication.
Microsoft.CIFramework.setClickToAct(false).then(
    function (result) {
        // result will indicate whether the outbound communication is enabled or not.
        console.log(result)
    },
    function (error) {
        // code handling for promise failure
        console.log(error)
    });
// To enable outbound communication.
Microsoft.CIFramework.setClickToAct(true).then(
    function (result) {
        // result will indicate whether the outbound communication is enabled or not.
        console.log(result)
    },
    function (error) {
        // code handling for promise failure
        console.log(error)
    });