8 Replies Latest reply on Apr 15, 2019 2:18 PM by Franck N

    Disable Dynamic Action

    SwaZ

      Hi ,

      Can any one please help to enable/disable Dynamic action using Javascript(programatically).

        • 1. Re: Disable Dynamic Action
          Franck N

          Hi,

           

           

          Can any one please help to enable/disable Dynamic action using Javascript(programatically).

          why, how ? what is the issue you are trying to solve? what is your use case?

           

          regards,

          Franck

          • 2. Re: Disable Dynamic Action
            SwaZ

            Hi Franck,

            I have  a requirement where on confirm dialog box if ok is pressed page submit should be done.

            So i have achieved it by using dynamic action click of #apexConfirmBtn('ok' button id).

            But if I use apex.message.alert window then also the dynamic action for page submit is called as the 'OK' button has the same id.

            So do we have any option to disable dynamic action on Alert window.

            • 3. Re: Disable Dynamic Action
              Jorgelina

              Does your confirm dialog box have an ID? Can you fire your DA only when that ID is involved?

              • 4. Re: Disable Dynamic Action
                SwaZ

                Hi Jorgelina,

                 

                apex.message.confirm displays a standard Dialog box. 'OK' button for confirm and alert has same id( #apexConfirmBtn).

                • 5. Re: Disable Dynamic Action
                  Franck N

                  Hi,

                   

                  please provide more input about the dynamic action.

                   

                  if it´s just a mater of page submit:

                   

                  here is a code to achieve it via dynamic action on your Button. only true action required execute javascript code:

                   

                  if(confirm('Are you sure your want to submit this page ?')){
                  //do stuff in case you have other operations related to the submit process
                  apex.submit();
                  }
                  

                  regards,

                  Franck

                  • 6. Re: Disable Dynamic Action
                    Jorgelina

                    Hey,

                     

                    I thought you were using a confirm dialog as a custom dialog... perhaps that is what you need.

                    Create a custom dialog and make the DA only act on the custom dialog, this way the apex.mesage.confirm will not interfere with the execution of your custom dialog.

                    • 7. Re: Disable Dynamic Action
                      SwaZ

                      Hi Franck,

                       

                      I am using Interactive Grid and I do have Unsaved changes confirmation message on search and filter on columns. So irrespective of any confirmation message based on Id of the button I was submitting the page. Below is the dynamic action used to fire the event.

                      "apexConfirmBtn" is the 'ID' of 'OK' button of apex.message.confirm dialog.It was fine for all confirmation dialog boxes(there are many on the page) but in the same application I was supposed to display some alerts. Alert window again has 'OK' button with id as "apexConfirmBtn". So Can i have some code to disable above dynamic action for alert windows.

                      • 8. Re: Disable Dynamic Action
                        Franck N

                        Hi,

                         

                        sorry but i not able to understand your goals here.

                        please try to reproduce you use case on apex.oracle.com.

                         

                        and we will start over from there.

                         

                        regards,

                        Franck