JavaScript tools.getDatabase
I tired to call the database in a HTML-Rule.
The Script language is JavaScript and i will always get an exception when i try to call a function with tools... (I tried also to import the publicAPI, but it doesn't work)
I need a solution to call the Database in Javascript and to put the result on the var Result
HTML-Rule
<script language="JavaScript">
switch (Action)
{
case "openCase" :
Database db = tools.getDatabase();
ClipboardPage lp = tools.createPage("Code-Pega-List", "");
lp.putString("pyMaxRecords", "1");
var aSQL = "select TEST as \"TEST\" from Table where Field = 'ABC'";
var Result = db.executeRDB(aSQL, lp);
...
break;
}
</script>