Skip to content

element.delete ​

Deletes an element from a dimension and from every hierarchy it's in.

js
element.delete(dimension, name)

Parameters ​

ParameterTypeDescription
dimensionstringThe dimension's name or id.
namestringThe element's name.

Returns ​

string

An empty string when it succeeds, or an error message when the dimension can't be found. Deleting an element that doesn't exist isn't an error.

WARNING

The old values aren't cleared from memory until the cube is next loaded from disk, for example after a server restart. If an element with the same name is created again before then, its old values come back with it.

That makes an accidental delete recoverable by recreating the element within that time window.

Examples ​

js
element.delete("Account", "600010");