다음을 통해 공유


updateContext(앱 프로필 관리자)

자동화 사전을 설정할 수 있으며 공급자가 슬러그 값을 추가, 수정 및 제거할 수 있습니다. 업데이트된 값은 나중에 매크로를 호출하는 데 사용할 수 있습니다.

Syntax

Microsoft.Apm.getFocusedSession().updateContext(input);

매개 변수

이름 유형 필수 Description
입력 JSON Yes 업데이트할 세션 컨텍스트의 JSON 입력 속성입니다.

반환 값

없음.

Example

Microsoft.Apm.getFocusedSession().updateContext({"customerName":"Contoso"});
Microsoft.Apm.getFocusedSession().getContext().then((context)=> context.get("customerName")).then(
    function success(result) {
        console.log(result);
        // should expected "Contoso"
        // Perform operations upon record retrieval and opening
    },
    function (error) {
        console.log(error.message);
        // Handle error conditions
    }
);