Announcement

Collapse
No announcement yet.

sc_exit(sel) -> onAfterUpdate

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • sc_exit(sel) -> onAfterUpdate

    Hello!

    sc_exit(sel); is not working on event onAfterUpdate. Gets stuck after the update button is clicked.

    As far as i remember, this bug existed since v5 and still it hasn't been fixed.
    Regards,

    Ishwor

  • #2
    Originally posted by ishwor View Post
    Hello!

    sc_exit(sel); is not working on event onAfterUpdate. Gets stuck after the update button is clicked.

    As far as i remember, this bug existed since v5 and still it hasn't been fixed.
    I have found same issue. If you use sc_exit, the application will hang, but not only after update.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      Hello,

      I have reported this issue to our bugs team for further testing.

      regards,
      Bernhard Bernsmann

      Comment


      • #4
        Hello,

        Are you trying to close an application using sc_exit(sel), or are you trying to return to a previous application, closing the current one, using the macro?

        regards,
        Bernhard Bernsmann

        Comment


        • #5
          It depends what you mean under application. I have a modal form showing a workflow rule and was trying to close when the user clicked one of the added buttons. Now they have to click a button, wait for the update and then have to click 'exit'. But because of that they can click the same button again which causes a problem in the businessrules. If you have the sc_exit the application simply hangs with the scrolling busy icon.
          Last edited by aducom; 12-12-2012, 05:22 AM.
          Albert Drent
          aducom software netherlands
          scriptcase partner, reseller, support and (turn-key) development
          www.scriptcase.eu / www.scriptcase.nl

          Comment


          • #6
            Hello Mr. Drent,

            By simply using sc_exit() without passing any parameter the application shouldn't hang.. It might be a case to get in touch with our support to find out why this is happening.

            sc_exit(sel) is used when you are working on an application, for instance a Grid, and from that Grid you call a Form in a modal, and then according to your logic at some point the Form will be closed and the user will return to the Grid application.

            Is that your case?

            regards,
            Bernhard Bernsmann

            Comment


            • #7
              At least that is my case. I have a set of workflow rules, a user is picking one up and a decisionform appears as a modal form. Then the user need to accept, decline, whatever. This is put behind a button. If you push a button the rule should be processed and the user needs to return to the original app. As soon as you use sc_exit nothing works.
              Albert Drent
              aducom software netherlands
              scriptcase partner, reseller, support and (turn-key) development
              www.scriptcase.eu / www.scriptcase.nl

              Comment


              • #8
                I think i have tried both, i.e. to exit from modal as well as "open in the same window" mode, and when sc_exit(sel) is called, to return to the original grid.

                The thing is that it seems to work in other events (where this macro can be applied), but not in onAfterUpdate..
                Last edited by ishwor; 12-13-2012, 06:58 AM.
                Regards,

                Ishwor

                Comment


                • #9
                  Hello,

                  After re-reading the topic, I noticed that you are calling sc_exit(sel) from onAfterUpdate, and that is where the problem is. sc_exit() scope doesn't cover onAfterUpdate().

                  Please see: http://downloads.scriptcase.com.br/d...sc.htm#sc_exit

                  regards,
                  Bernhard Bernsmann

                  Comment


                  • #10
                    Thanks,

                    Anyway, how we'd use / in what case we'd need sc_exit() in onScriptInit.

                    By the way it works perfectly fine in onAfterDelete event. Would it be wiser to add it in onAfterUpdate?

                    Also according to the documentation, there is onClick() event in form application , i haven't seen that event in Form application
                    Regards,

                    Ishwor

                    Comment


                    • #11
                      Ishwor,

                      That is a button event being fired. I have contacted our development team to see if it is possible to add that macro to other events.

                      regards,
                      Bernhard Bernsmann

                      Comment


                      • #12
                        Ok. I was not certanly thinking of the button events when i wrote the message :P

                        Anyway, it would be easier to do certain things in the form if this macro would be added to the other events.

                        Thanks Bernhard for your help,
                        Regards,

                        Ishwor

                        Comment


                        • #13
                          Yes I missed that. Then the question should become: how can I close the modal form from a macro? In my case it's just a button, but onafterupdate would be ok.
                          Albert Drent
                          aducom software netherlands
                          scriptcase partner, reseller, support and (turn-key) development
                          www.scriptcase.eu / www.scriptcase.nl

                          Comment


                          • #14
                            Hello,
                            in my application a from is always called by a grid ... in the grid I define that the form is automatically closed after update..
                            So I don't need sc_exit(). I agree that it's not logic not to alow sc_exit in OnAfterUpdate...

                            Regards
                            Uwe

                            Comment


                            • #15
                              Well it's worth a try. But I do the update in my own php event, not as a result of a 'normal' crud operation. So I don't expect much. But I agree on the onafterupdate though.
                              Albert Drent
                              aducom software netherlands
                              scriptcase partner, reseller, support and (turn-key) development
                              www.scriptcase.eu / www.scriptcase.nl

                              Comment

                              Working...
                              X