createObject(classId, name, callback);
classId. Identifier of created object class. Element of the PP.Mb.Ui.MetabaseObjectClass enumeration.
name. Name of the creates object.
callback. Callback function.
The createObject method creates a repository object.
To execute the example, the page must contain NavigatorBox component named navbox (see Example of Creating the NavigatorBox Component). Create a new object in the current repository folder:
navbox.createObject(2561, "New OLAP", PP.Delegate(function (sender, args) {
var res = JSON.parse(args.ResponseText);
console.log("Key of the created object: " + res.CreateObjectResult.object.k)
}));
After executing the example an express report named New OLAP is created in the current folder. Key of the created object is displayed to the browser console.
See also: