13 Replies Latest reply on Mar 11, 2013 9:38 AM by Tonito99

    Master detail form issue retrieving service price automatically

    Tonito99
      Hi,

      I developed a master detail form in order to process service requests.

      On details block I'm trying to retrieve automatically service price after I select service name from LOV.

      For this purpose I created a application plsql process

      declare

      v_price service.price%type;

      begin
      select     price into v_price
      from      service
      where      service_no = 1;

      htp.prn(v_price);
      exception when others then htp.prn('An error occurred retrieving the PRICE');

      end;

      Which process I'm calling through javascript function in order to retrieve service price.

      <script type="text/javascript">

      function GetServicePrice(pThis)
      {   
      var vRow = pThis.id.substr(pThis.id.indexOf('_')+1);
      html_GetElement('f07_'+vRow).value = new htmldb_Get(null,html_GetElement('pFlowId').value,'APPLICATION_PROCESS=getPrice',0);
      }

      </script>

      Instead of price it returns this value: "[object Object]".
      Is it possible to work as I intended or it should other way around?

      I appreciate your help/comments.

      Application Express 4.2.1.00.08
      Oracle Database 11g Express Edition Release 11.2.0.2.0

      Regards,