Forum Stats

  • 3,871,967 Users
  • 2,266,360 Discussions
  • 7,911,017 Comments

Discussions

How can I block pages in Oracle Apex?

Hello,


I have a table that works with trigger, but does not place the email, since the user is the one who must place, and I have a page where the user's profile is, but I want to force the user to place his email and when he goes to another page it returns him back to the profile page and shows an error that he must place his email.


How can I do this in APEX?


Thanks.

Answers

  • InoL
    InoL Member Posts: 10,179 Blue Diamond

    I have a table that works with trigger, but does not place the email

    What do you mean by that? Do you have a table trigger with code that sends an email? That is a VERY bad idea. Trigger code is executed, i.e. a mail is sent, but the transaction may still be rolled back.

    What process triggers an email? How is this implemented?

    but I want to force the user to place his email 

    Define the email address item on the profile page as mandatory. That way you can't save your profile without an email address.

  • Edisson Gabriel López
    Edisson Gabriel López Member Posts: 65 Green Ribbon


    HI @InoL


    When the user enters, this is the URL:

    I have this page and when users log in for the first time they must complete their basic data such as changing their password and registering an email, but the problem I have is that the user can skip this step and that should not happen:

    But some advanced knowledge user I can reach and place a page as you can see here:

    What is this page: 


    I do not know what I can do so that this does not happen.

    Thank you.

  • InoL
    InoL Member Posts: 10,179 Blue Diamond

    I do not know what I can do so that this does not happen.

    Invalid number looks like a programmer error in your query. What exactly is this query?

    If you completely want to prevent a user from going to that page, there are many places where you can add a condition or authorization scheme

    <user email> is not null

    (how you determine <user email> is up to you, probably a query on a user table).

    E.g. you can add an authorization scheme to the page, you can conditionally render the report region if email is not null, you can conditionally show a message when email is null, you can conditionally branch to some other page in the Before Header section when email is null etc.