setEntMetaData
Syntax

app.setEntMetaData(metaData);
Parameters
metaData EntMetaData
Metadata of the object to set properties for on Studio Server.
Return value int32
The status returned from Studio Server
Description
The setEntMetaData() method sets metadata properties for an object stored in Studio Server. The object identifier of the Studio Server object is included in the EntMetaData object. The method throws an exception in case of an error.
Limitations:
-
The method will only be successful if the object is not locked by the current user or another user.
-
Only properties that are configured for the Set Properties dialog can be changed using the scripting method.
Examples
Set metadata properties for an object by its ID
// Get metadata of object '19083' and change the 'Cities' custom property of type multilist.
var objID = "19083";
var key = "C_CITIES";
try {
var meta = app.getEntMetaData(objID);
meta.set(key, ["Paris", "Berlin"]);
app.setEntMetaData(meta);
} catch (e) {
alert("Setting metadata properties for [" + key + "] failed: [" + e.message + "].");
}
Supported versions
| Adobe Version | Supported |
|---|---|
| 2023 | ✔ |
| 2024 | ✔ |
| 2025 | ✔ |
| 2026 | ✔ |