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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Get Error Processing Validation

Andrew.LukesJul 4 2021 — edited Jul 4 2021

Apex 20.2
db; 19c

Overall goal:
I always want ensure that at least one user is in the manage organization role. I count the number of users in that role, and if there is more than one, I want to allow a user to be removed from the role, or the user can be deleted. If there is only one user in the manage organization role, I don't want to allow the user in the manage organization role to be deleted, or removed from the role. A message should be generated to explain the situation.

1 error has occurred
Error processing validation

debug shows: 
- ora_sqlerrm: ORA-06502: PL/SQL: numeric or value error

P34_MANAGER_COUNT   IS A NUMERIC FIELD


error occurs after apply changes button clicked

Is the problem related to validating when clicking the update button and the P34_MANAGE_ORG IS NOT ACTUALLY PART OF THE UPDATE?

I use a dynamic action to count the number of manage_orgs = Y
DECLARE
v_temp number;
BEGIN
SELECT COUNT(PRIMARY_ORG_ROLE_ID)
INTO
v_temp
FROM PRIMARY_ORG_ROLE
WHERE PRIMARY_ORG_ID = :P34_PRIMARY_ORG_ID AND MANAGE_ORG = 'Y';
RETURN v_temp;
END;
Then I validate and check :P34_MANAGE_ORG because the customer needs to have at least one manage org user and won't be allowed to remove a manager unless another user becomes a manager first.

Is there a better way to ensure that a user can't delete a user or remove their manage org permissions if there is not at least one manager?

submit button
save_button.PNG

Validation: tried 0 to test
TOP2.PNGvalidation bottom.PNG

This post has been answered by Klostrie-Oracle on Jul 12 2021
Jump to Answer

Comments

Processing

Post Details

Added on Jul 4 2021
6 comments
2,192 views