updateContext (pengurus profil apl)

Membolehkan anda menetapkan kamus automasi dan membolehkan pembekal menambah, mengubah suai dan mengalih keluar nilai siput; Nilai yang dikemas kini kemudiannya tersedia untuk memanggil makro pada masa hadapan.

Sintaks

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

Parameter

Nama Taip Diperlukan Description
Input JSON Ya Sifat input JSON bagi konteks sesi yang akan dikemas kini.

Nilai pulangan

Tiada.

Contoh

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