5 Replies Latest reply on Feb 24, 2017 11:29 AM by Mint-Innit?

    Conditionally Displayed Modal Page (with Notifications IR) after Login

    Mahmoud_Rabie

      Hello Everybody,

       

      Environment:

      Apex 5.1

       

      The Operations

      1. An admin user assign notifications for some users.
      2. A Modal Page contains IR of notifications would be displayed ONLY to some users which admin likes to notify them.
      3. That modal page would be called conditionally after login page for certain user which has to see some notifications.
      4. Once the user view the notifications IR, the close button redirects to the home page.
      5. Other users with no notification would be redirected to the home page directly after login.

       

      Questions:

      • The problem starts from Step 3. There are some questions:
        • How to call this modal page conditionally then after closing the modal it redirects to the home page?
        • Could someone provide a demo or some resources for accomplishing such task?

       

      Any help, suggestions or resources would be appreciated.

       

      Regards

      Mahmoud

        • 1. Re: Conditionally Displayed Modal Page (with Notifications IR) after Login
          jwellsnh

          Just a thought, why not display the IR Notification as a region on the home page and use an Authorization Scheme based on role and the presence of Notifications as a condition of the region.

           

          Jeff

          • 2. Re: Conditionally Displayed Modal Page (with Notifications IR) after Login
            Mahmoud_Rabie

            Just a thought, why not display the IR Notification as a region on the home page and use an Authorization Scheme based on role and the presence of Notifications as a condition of the region.

            Jeff,

             

            Thanks for your response.

             

            I prefer modal page in notifying users.

             

            Regards

            Mahmoud

            • 3. Re: Conditionally Displayed Modal Page (with Notifications IR) after Login
              Mint-Innit?

              I may well have a requirement to do something similar, present notifications [on login] to users which they can dismiss, but later go back to view in an IR or similar. (Not quite the same as you, but your requirement would also be useful).

               

              At the moment I've built a global notification system based on and extended from the one in the Live Poll packaged application (I will use it for warning users of downtime due to server maintenance, upgrades etc). I am just now starting to think about how this could be extended.


              Cheers.

              1 person found this helpful
              • 4. Re: Conditionally Displayed Modal Page (with Notifications IR) after Login
                Mahmoud_Rabie

                At the moment I've built a global notification system based on and extended from the one in the Live Poll packaged application

                Which pages in that packaged app do you refer?

                • 5. Re: Conditionally Displayed Modal Page (with Notifications IR) after Login
                  Mint-Innit?

                  Hi Mahmoud, my current apex version is 5.0.3.00.03, I don't know if it'll be the same in 5.1 or not.  However there's an admin page (30) in Live Poll to manage notifications (with an IR with a link to an edit page (31) also). The notification data are stored in the table EBA_LIVEPOLL_NOTIFICATIONS.

                   

                  In Live Poll the notifications themselves are only displayed on page 1.

                   

                  In my application I initially just copied in 30 and 31 from Live Poll, created my own table to store what I wanted, modified those pages to work with the new table, and then took the notification area from Live Poll page 1 and added a modified version of it to page 0 in my application. Therefore my notifications appear on every page so the user can't miss them (well they can, there's always one who says they didn't see anything, but I digress ;-)  It also means they appear on the login page of course, which I like as it warns the user of impending doom maintenance before they even log in.

                   

                  If I was doing it again I'd probably create pages from scratch rather than importing from Live Poll, all the queries are pretty simple.

                   

                  I am currently pondering how to go about having user-specific notifications, but don't plan to actually implement anything just yet, too much else to do first.

                   

                  Cheers.

                  1 person found this helpful