updateContext (מנהל פרופיל יישום)

מאפשר לך להגדיר את מילון האוטומציה ומאפשר לספקים להוסיף, לשנות ולהסיר ערכים של תיאורים קצרים; הערכים המעודכנים יהיו זמינים להפעלת פקודות מאקרו בעתיד.

תחביר

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

פרמטרים

שם Type נדרש תיאור‬‏‫‬
קלט JSON כן מאפייני קלט JSON של הקשר ההפעלה שיש לעדכן.

ערך החזרה

ללא.

דוגמה

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