updateResult Method

Oracle Field Service sends the updateResult message in response to the update message. It contains the latest available entity data, including the changes applied by the last update message. The updateResult message has the same format and contents as an open message. This allows the plug-in to work with actual data without having to close and reopen the plug-in page.

If plug-in has to get the latest entity data without changing anything, it may just send the update message with no entity collections. However, be aware that the changes applied on the server by other users or through REST API are not delivered instantly to the user's device, and the contents of the updateResult message show the current state of the entities on a device (in a particalar session of a browser or the installed app).

Example of update message:

{
    "apiVersion": 1,
    "method": "updateResult",
    "activityList": {
        "4224031": {
            "WO_COMMENTS": null,
            "cname": null,
            "caddress": "Cleveland",
            "ccity": null,
            "aworktype": "4",
            "astatus": "pending",
            "aid": "4224031",
            "atype": "regular"
        }
    },
    "inventoryList": {
        "21064417": {
            "invsn": "PTI1234789",
            "invpool": "provider",
            "invid": "21064417",
            "inv_aid": null,
            "inv_pid": 3000001
        }
    },
    "queue": {
        "date": "2021-08-17",
        "status": "notActivated",
        "isActual": true
    },  
    "resource": {
        "pid": 3000001,
        "external_id": "33001",
        "currentTime": "2021-08-17 20:48:26",
        "deviceUTCDiffSeconds": 0,
        "timeZoneDiffSeconds": -14400
    },
    "team": {
        "teamMembers": {},
        "assistingTo": {},
        "assistingMe": []
    },
    "user": {
        "allow_desktop_notifications": 1,
        "allow_vibration": 1,
        "design_theme": 11,
        "format": {
            "date": "m/d/y",
            "long_date": "l, F jS, Y",
            "time": "h:i A",
            "datetime": "m/d/y h:i A"
        },
        "providers": [
            2
        ],
        "sound_theme": 2,
        "su_zid": 2,
        "uid": 2315,
        "ulanguage": 1,
        "language": "en",
        "ulogin": "admin",
        "uname": "Admin",
        "week_start": 0
    },
    "buttonId": "20348",
    "openParams": {}
}

Example of an empty update message for data refresh:

{
    "apiVersion": 1,
    "method": "update"
}