Wednesday, 28 February 2024

How to Call Modal Dialog in Apex Using Java script and Pass the Parameters

 How to Call Modal Dialog in Apex Using Java script and Pass the Parameters


Create a Dynamic Action and Use the Code on Double Click Event


var x = apex.item('P492_COSTNO').getValue();
var url = "f?p=#APP_ID#:493:#SESSION#::NO:RP,493:P493_COSTNO:#P492_COSTNO#";
url = url.replace("#APP_ID#", $v("pFlowId"));
url = url.replace("#SESSION#", $v("pInstance"));
url = url.replace("#P492_COSTNO#", x);
apex.server.process("PREPARE_URL", {
x01: url
  }, {
  success: function(pData) {
   if (pData.success === true) {
     apex.navigation.redirect(pData.url);
   } else {
     console.log("FALSE");
   }
 },
error: function(request, status, error) {
console.log("status---" + status + " error----" + error);
  }
});


Then Create a Process on Ajaxcallback and Name it PREPARE_URL

THEN Add the Folowing Code

declare
result varchar2(23333);
begin
result:=apex_util.prepare_url(apex_application.g_x01);
apex_json.open_object;
apex_json.write('success', true);
apex_json.write('url', result);
apex_json.close_object;
exception
when others then
apex_json.open_object;
apex_json.write('success', false);
apex_json.write('message', sqlerrm);
apex_json.close_object;
end;

Thursday, 22 February 2024

User Authentication Scheme for RTF Report Calling in Apex Using BI Publisher

 

User Authentication Scheme for RTF Report Calling in Apex Using BI Publisher

 

 

DECLARE

 

 ACL_PATH VARCHAR2(4000);

 

BEGIN

 

 -- Look for the ACL currently assigned to '*' and give APEX_050100

 

 -- the "connect" privilege if APEX_210200 does not have the privilege yet.

 

 

 

 SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS

 

  WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;

 

 

 

 IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'APEX_230100',

 

   'connect') IS NULL THEN

 

   DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,

 

   'APEX_230100', TRUE, 'connect');

 

 END IF;

 

 

 

EXCEPTION

 

 -- When no ACL has been assigned to '*'.

 

 WHEN NO_DATA_FOUND THEN

 

 DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('power_users.xml',

 

  'ACL that lets power users to connect to everywhere',

 

  'APEX_210200', TRUE, 'connect');

 

 DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*');

 

END;

 

 

 

 grant execute on utl_http to smf_apex_w

Check Internet Connectivity on Local System

if (!navigator.onLine) {     showOfflineAlert(); } else {     // Set a strict 3-second network timeout threshold     const controller = new ...