다음을 통해 공유


Dynamics 365 채널 통합 프레임워크 2.0용 createTab(JavaScript API 참조)

비고

포커스된 세션이 공급자에 속하거나 홈 또는 기본 세션인 경우에만 이 API를 사용합니다.

포커스 세션에서 탭을 만들고 생성된 탭의 고유 식별자를 반환합니다.

Syntax

Microsoft.CIFramework.createTab(input, correlationId).then(successCallback, errorCallback);

매개 변수

이름 유형 필수 설명
입력 String Yes JSON 입력
success콜백 기능 아니오 레코드가 생성될 때 호출하는 함수입니다. 생성된 탭의 고유 식별자(탭 ID)가 응답에 반환됩니다.
error콜백 기능 아니오 작업이 실패할 때 호출하는 함수입니다. 다음 속성을 가진 개체가 전달됩니다.
errorCode: 숫자. 오류 코드입니다.
message: 문자열. 문제를 설명하는 오류 메시지입니다.

JSON 매개 변수의 input 구조는 다음과 같습니다.

{
    //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>;
}

반환 값

탭 ID의 값을 문자열로 사용하는 Promise

Example

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);
});