updateContext (pengelola profil aplikasi)

Memungkinkan Anda mengatur kamus otomatisasi dan memungkinkan penyedia untuk menambahkan, memodifikasi, dan menghapus nilai slug; Nilai yang diperbarui kemudian tersedia untuk memanggil makro di masa mendatang.

Syntax

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

Parameter-parameternya

Nama Tipe Diperlukan Description
masukan JSON Yes Properti input JSON dari konteks sesi yang akan diperbarui.

Mengembalikan nilai

Tidak ada.

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