7 Replies Latest reply on Jan 22, 2014 11:39 PM by johannes

    Cannot undo a field modification


      Hi all,


      I would need help with a strange phenomenon.


      I have the following portal row (segment):



      Every field from "Art" to "Anz" has a script attached to the "on object modify" event. This script checks for a condition and if true displays a warning and undoes the last modification. The reason is that a modification in one of those fields may cause inconsistancies and must follow a special procedure.


      This works on all fields except the field "Typ". If I select a different option in field "Typ" the cursor advances to the next field and the Undo script step does not undo the modification. Although the Field "Art" is also a dropdown list the undo script step does work on this field as on any other field except "Typ".


      I have deleted the field "Typ" and put it back in but to no avail.


      This just drives me mad.


      Any ideas are greatly appreciated.



        • 1. Re: Cannot undo a field modification

          My best guess is that the test your script performs is breaking down with this particular field. Have you stepped it though with the debugger and data viewer to see what is happening?

          • 2. Re: Cannot undo a field modification

            … and seeing your script including those tests might be helpful, too.


            Übrigens: ist “Dimension” nicht eher „Maße“ oder „Abmessungen“?

            • 3. Re: Cannot undo a field modification



                   Have you tried removing the value list from the field and just entering text to see if the script works?


                   Or have you considered handling the "inconsistencies" ahead of time with a conditional value list? In other words, the value list shows only acceptable values based on the value of a previous field.


              Al Quimby

              • 4. Re: Cannot undo a field modification

                Yes. The scipt is the same for all fields. The undo script step is executed for this field too but nothing happens. The difference is, that with the other fields the cursor remains in the field. With the field "Typ", however, when I make the selection the cursor jumps to the next field and I cannot stop it from doing that. The srcipt works for this field if I make it an edit box. Then, as soon as I type anything the warning pops up and the modification is undone.

                • 5. Re: Cannot undo a field modification

                  Here is the script. It's quite simple.



                  Ja, das stimmt. Die Anwendung stammt aus dem Reifenhandel. Mit Dimension bezeichnet man dort die Abmessungen eines Reifens.

                  • 6. Re: Cannot undo a field modification

                    Yes. I made the field an edit box and then the sript works (see my comment further up). The value list is just a list of three choices.


                    The backgroud for the test is, that for an invoice line there may be active stock reservations for this invoice, which meet exactly the conditions of this invoice line. Changing any of those fields requires that the stock reservation is released and a new reservation is be made, manually. The user needs to be aware of this consequence and hence is warned before the action continues. He has the choice to undo the change in case it was made accidentally.

                    • 7. Re: Cannot undo a field modification

                      Hi all,


                      Just for the records:


                      I changed the field type from dropdown list to popup menu and now it works!


                      Thanks for thinking into it.