Disallow Update or delete in Oracle Apex through Process

Disallow Update or delete in Oracle Apex through Process :

NB: CREATE PROCESS ON SAVE/"Apply Changes" Button:

VAL_UPDATE_PERMISSION

DECLARE
  V_USER_TYPE NUMBER(10);
BEGIN
  SELECT USERTYP INTO V_USER_TYPE FROM APPSUSERS WHERE LTRIM(RTRIM(USERNAME))=LTRIM(RTRIM(:APP_USER));
  IF V_USER_TYPE =4 THEN
    RETURN 'YOU ARE NOT ALLOWED TO UPDATE.';
  END IF;
END;

NB: CREATE PROCESS ON DELETE Button:

VAL_DELETE_PERMISSION

DECLARE

  V_USER_TYPE NUMBER(10);
BEGIN
  SELECT USERTYP INTO V_USER_TYPE FROM APPSUSERS WHERE LTRIM(RTRIM(USERNAME))=LTRIM(RTRIM(:APP_USER));
  IF V_USER_TYPE >=3 THEN
    RETURN 'YOU ARE NOT ALLOWED TO DELETE.';
  END IF;
END;





Muhammad Abdullah Al Noor

Muhammad Abdullah Al Noor, An Oracle Apex Consultants and founder of Noors Technology (www.noorstech.com). Core Expertise : Database Administration, Oracle Forms and Reports Development, Oracle Apex Application Designer and Development, Linux Professional etc. Also the owner of TrainerBD Training and OraDemy E-Learning. WhatsApp +8801790721177

Post a Comment

Previous Post Next Post