Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Create JSON using apex_json API inside Interactive Grid Save

RamOrcl-OracleJan 8 2019 — edited Jan 8 2019

Hi,

Am trying to generate a JSON on click of Save button in Interactive Grid. Here is the function used to generate JSON. Am using Apex "18.1.0.00.45".

Am getting this error.

"Ajax call returned server error ORA-20987: APEX - JSON.WRITER.CLOSE_OBJECT - Contact your application administrator. for ."

When i invoke this function on click of a normal button outside of IG then it works fine.

Can anyone tell me why it is not working on click of save button inside IG.

function get_clob return clob

  is

        l_clob           clob;

begin

     apex_json.initialize_clob_output;

     apex_json.open_object;

          apex_json.open_object('ACTIONABLE_EMAIL');

               apex_json.write('PAYLOAD_ID', 100);

               apex_json.write('PAYLOAD_NAME', 'Inception Template');

          apex_json.close_object;

     apex_json.close_object;

   l_clob := apex_json.get_clob_output;

   apex_json.free_output;

  return l_clob;

end get_clob;

Comments
Post Details
Added on Jan 8 2019
2 comments
779 views