Hi
I have a dialog used for adding/editing records in a grid. The DB is mySql.
In that dialog, i have the following code in my afterDialogValidate
In working preview, the code works great. Record is saved in the DB, PDF report gets generated in due place, and the generated report is emailed.
When running in the browser, after publishing the project, clicking on submit does not seem to do anything ( i.e dialog stays put, and stays dirty ) but noticed the record is saved in the DB. The rest of the code does not run, and the dialog doesn't close ( which is obvious if the code didn't run )
Any clues?
Thanks,
Jaime
I have a dialog used for adding/editing records in a grid. The DB is mySql.
In that dialog, i have the following code in my afterDialogValidate
Code:
function afterDialogValidate as v (e as p) ExecuteServerSideAction("Save Data::SaveDialog") dim myargs as sql::Arguments myargs.add("whatOrderID", e.dataSubmitted.OrderID ) dim FileName as C FileName = "C:\MyCustomer\Reports\Res" FileNAme = FileName + alltrim(str(e.dataSubmitted.OrderID))+".pdf" dim options as p options.filter = "OrderID = :whatOrderID" report.SaveAs("Daily Confirmation", "PDF", "", "", FileName, .f., options, myargs) 'debug(1) dim curEmail as C = e.dataSubmitted.CustomerEMail dim curSubject as C dim curMessage as C curSubject = "Reservation "+alltrim(str(e.DataSubmitted.OrderID)) curMessage = "Dear "+e.dataSubmitted.Contact + Crlf() curMessage = curMessage + "Please find attached the details of your Reservation"+crlf(2) dim pm as P dim ps as P if (email_smtp_open(ps, myserver, 25, myUser, myPassword)) then pm.to = curEMail pm.from = "someemailaddress" pm.subject = curSubject pm.message = curMessage pm.attachments = FileName email_smtp_send(pm, ps) end if email_smtp_close(ps)
When running in the browser, after publishing the project, clicking on submit does not seem to do anything ( i.e dialog stays put, and stays dirty ) but noticed the record is saved in the DB. The rest of the code does not run, and the dialog doesn't close ( which is obvious if the code didn't run )
Any clues?
Thanks,
Jaime
Comment