title | description | ms.date | ms.topic | author | ms.author | ms.custom | ||
---|---|---|---|---|---|---|---|---|
createTab (JavaScript API Reference) for Dynamics Channel Integration Framework 2.0 | MicrosoftDocs |
Includes description, syntax, and parameter information for the createTab method in JavaScript API Reference for Channel Integration Framework 2.0. |
10/23/2023 |
reference |
gandhamm |
mgandham |
|
Note
Use this API only when the focused session belongs to the provider or if it is the home or default session.
Creates a tab in a focused session and returns the unique identifier of the created tab.
Microsoft.CIFramework.createTab(input, correlationId).then(successCallback, errorCallback);
Name | Type | Required | Description |
---|---|---|---|
input | String | Yes | JSON input |
successCallback | Function | No | A function to call when a record is created. Unique identifier (tab ID) of the created tab is returned in the response. |
errorCallback | Function | No | A function to call when the operation fails. An object with the following properties will be passed: errorCode: Number. The error code. message: String. An error message describing the issue. |
The structure of the input
parameter JSON is as follows:
{
//Unique name of the tab
// type = string
templateName: <unique name of the tab template>;
//additional context for tab creation and tab slugs
// type = JSON Object
templateParameters?:<>
//should this tab be focused after the creation
// type=boolean
isFocused?: <true or false>;
}
Promise with the value of tab ID as String
var tabInput = {
//Unique Name of the Application Tab Template
// type = string
templateName: "msdyn_test_entity",
templateParameters: {
entityName: "incident",
data: "{}",
},
isFocused: true
};
Microsoft.CIFramework.createTab(tabInput).then((tabId)=>{
console.log("created tab with id" + tabId);
}, (error)=>{
console.log(error);
});
[!INCLUDEfooter-include]