Forum Discussion

ddidonato's avatar
ddidonato
Creator II
5 years ago

Delete Button in Form

My Form has two buttons "Save" and "Delete".

For the Save button I have a method for onClick  = "top.onSaveCommand()" which works.

For the Delete button I have a method for onClick  = "top.onDeleteCommand()" which I get the following error "Event handler failed with message: TypeError: aWindow.showModalDialog is not a function"

4 Replies

  • Which Aras version do you use? Using "top" is not common in the latest Innovator versions (>11SP9). And your error message "showModalDialog" indicates the good old modal dialog, which would be also outdated. Beware using old samples :-)

    In Innovator 12 I would try something like this: 

    window.onDeleteCommand(idsToDelete);

    window.onDeleteCommand(true);

      • angela's avatar
        angela
        Catalyst II

        Ok. My samples will probably not work. They are from Innovator 12 where the buttons are CUI elements.

        Maybe parent.onDeleteCommand() or onPurgeDeleteCommand("delete"); ?

        Your should be able to use 'onSaveCommand()' without top in front of it. According to Aras users shall leave the "top" away, cause it may cause some trouble.