setObjectName(name: String);
name. Repository object name.
The setObjectName method sets a new name for the current repository object.
To execute the example you must be logged in to the Prognoz Platform 9 web application. An express report with the 4960 key and class identifier 2561 must also be available. The scenarios specified below must be started in the browser console.
Open the express report with the 4960 key in the view mode:
var mbObject = new PP.Mb.Object({
Key: 4960 // Key of express report to open
});
var moduleData =
{Module:
{Data: 2561}
}
// Open express report with the 4960 key for view
PP.App.openObject(mbObject, PP.App.OpenMode.Open, moduleData);
After executing the example the express report opens in the view mode. Then determine its name and name of the corresponding repository object and set a new name for the express report:
// Set new name
PP.App.setObjectName("Express report");
After executing the example the Express Report name is defined for the express report:
Now close this object:
var mbObject = new PP.Mb.Object({
Key: 4960 // Key of closed express report
});
// Now close object
PP.App.closeObject(mbObject, mbObject.Key, true);
During the specified scenario execution the express report object with the 4960 key is closed.
See also: