Question

7
Replies
1755
Views
DespotJ1 Member since 2015 3 posts
Sopra Steria AG
Posted: 3 years ago
Last activity: 3 years 11 months ago
Closed

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>

Low-Code App Development Data Integration Java and Activities
Moderation Team has archived post
Share this page LinkedIn