Edit

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

Note

Use this API only when the focused session belongs to the provider.

Sets the state of the panel.

Syntax

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

Parameters

Name Type Required Description
value Number Yes The value to set the mode of the panel.
Channel Integration Framework 1.0Channel Integration Framework 2.0
Enter 0 to minimize the panel.
Enter 1 to dock the panel.
Enter 0 to minimize the panel.
Enter 1 to dock the panel.
Enter 2 to hide the panel.
Enter 3 to collapse the panel.
successCallback Function No A function to call when the request for setting the panel state is successful.
errorCallback Function No A function to call when the request for setting the panel state fails.

Return value

Returns a promise object with a value.

Example

// Setting Panel to minimize mode.
Microsoft.CIFramework.setMode(0).then(
    function (result) {
        // result will have current state of the panel.
        console.log(result)
    },
    function (error) {
        // code handling for promise failure
        console.log(error)
    });