I have an import function which will parse the XML file which contains the version information of the document and save it in database. If user try to upload the already exi
I faced very similar question. The solution I came up with was to split the logic into 2 - first, when the button is pressed use 'action' to prepare the data for the validation and use 'oncomplete' to run a remote command which displays the confirmation dialog in which 'OK' is the real action.