Dictionary.clearAll

Syntax

clearAll();

Description

The clearAll method clears data of MDM dictionary.

Example

To execute this example, the page must contain the DictionaryBox component named dictionaryBox (see Example of creating the DictionaryBox component ). Clear data of MDM dictionary:

// Get an MDM dictionary
var source = dictionaryBox.getSource()[0];
// Clear dictionary data
source.clearAll();
// Determine metadata
source.setMetadata({
    attrs: {
        its: {
            it: []
        }
    }
});
// Refresh dictionary element tree
dictionaryBox.getDataArea().getActiveDictTree().refreshAll();

After example execution data of MDM dictionary has been cleared:

See also:

Dictionary