Does anyone know if you can create an image variety with the JS API?
I've tried this...
js_api.createAsset({ "parent_id": <parent_asset_id>, "asset_name": "<variety_name>", "type_code": "image_variety", "link_type": 2, "dataCallback": function (data) { console.log(data); } });
...but get an error message:
error: "Exception occured when executing JS API function "createAsset()": Assertion failed: [NULL] "" is not a valid asset ID"
I could do it with a Trigger, but it'd be nicer to do in JS.
Cheers,
Jamie