dms.UpdateOsEvent

Updates the script code of an existing OS event.

This job accesses the internal scripting infrastructure of enaio® directly. Incorrectly configured events can cause unexpected behavior or serious malfunctions on the client or server side.

1. Input Parameters

Name Type Required Description

OsEventId

INT

Yes

ID of the event to update. Corresponds to the id field in the JSON response of dms.GetOsEvents.

VBCode

BYTE[]

Yes

New script code of the event (JavaScript or VBScript), passed as BYTE[] (BASE64). Encode the bytes as UTF-8 with BOM — the server detects UTF-8 only by the leading BOM and then stores the full Unicode range. Without a BOM the bytes are interpreted as legacy Windows-1252 (cp1252). Applies regardless of is_js and of whether the system is a Unicode system.
Description: Field vb_code

dms.UpdateOsEvent changes only the script code (vb_code). EventCode, OsClassName, OsEventParams, and AppClass are immutable; to change these, the event must be deleted and recreated with dms.CreateOsEvent (the new event receives a new id).

2. Return Value

(INT): 0 = Job successful, otherwise error code
Complete list of error codes