Hey Umar,
I'm not sure if this helps, but following the documentation, the is a function to get the enum map:
https://apidocs.rnd.mendix.com/7/client/mendix_lib_MxMetaObject.html#getEnumMap
Following this logic, maybe it is possible to do it like this:
mxobj.set("Status", { key : "online", caption : "online" });
Hi Umar,
I’m 99% sure you’re doing it right. Are you sure you have write permissions to that enumeration?