AC
Hello, all!
In the report I need to get objects or models which are chosen by the user on the server. I use a standard method:
Dialogs.BrowseArisItems ( String sTitle, String sDescription, String sServerName, String sDatabaseName, int itemKind )
It returns string ID of item.
How can I get the normal names of groups and models for this ID?
Thanks!
Thanks to Ilya Seletkov for the answer.
The answer contains the following:
1) Necessary to use the BrowseArisItems method with the DatabaseName parameter.
BrowseArisItems ( String sTitle, String sDescription, String sServerName, String sDatabaseName, int itemKind );
2) Returns the active database:
var activeDB = ArisData.getActiveDatabase();
3) Then in a active database it will be possible to find objects by means of methods:
var obj = activeDB.FindGUID ( String sGUID ); or var obj = activeDB.FindOID ( String sOID ); 4) Then, we find a name or type of object: obj.KindNum(); or obj.Name(g_Language);