次の方法で共有


updateContext (アプリ プロファイル マネージャー)

オートメーション ディクショナリを設定し、プロバイダーがスラッグの値を追加、変更、削除できるようにします。更新された値は、将来マクロを呼び出すために使用できます。

構文

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

パラメーター

名前 タイプ 必須 Description
インプット JSON イエス 更新するセッションコンテキストの 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
    }
);