title: Siebel Open UI - How to make a query over Business Component from Javascript
body: <p>I'm struggling to a Siebel Open UI requirement which ask for running a query over the current Business Component upon a double click on a record.</p>
  
  <p>I tried the following in PR js associated to my custom applet:</p>
  
  <pre><code> var pm = this.GetPM();                                                                                                 
   var recordSet = pm.Get("GetRecordSet");
   for (record in recordSet) {
   var row = $("#" + this.GetPM().Get("GetPlaceholder"))
    .find("tr[id=" + (Number(record) + 1) + "]")
    .dblclick({ctx:pm}, function(event) {
    var bc = event.data.ctx.Get("GetBusComp"); 
    bc.InvokeMethod("ClearToQuery");
    bc.SetSearchSpec("Id","1-81OR");
    bc.InvokeMethod("ExecuteQuery");  
  }); 
  }
  </code></pre>
  
  <p>the "bc" variable seems to be corrected instantiated, but when I look in the method exposed (console web browser) I don't see any of interest for making a query apart from InvokeMethod("ExecuteQuery") which is not working (it does nothing when I look at the logs).</p>
  
  <p>Do you know how can I make such query from PR or PM?</p>
  
  <p>Vincenzo</p>