Sergey Kornilov 5/27/2021 | |
PDF API is Javascript based which means you cannot use it in the server event. What you can do is to redirect user to the View page add when page is being loaded create the PDF and send it via email. |
M
|
Michael Perry author 6/1/2021 |
That article seems to be for phprunner... I am okay with the user being redirected to the view page once added.. i just need to pdf page to email itself without any user input... any help would be amazing. |
Sergey Kornilov 6/1/2021 | |
M
|
Michael Perry author 6/1/2021 |
set attachment = = CreateDictionary() <---- = = ?? really hard to follow help docs with typos... Also the code/help page seems to be coded for a button...... How would one use that code to run when a record is added and then redirected to the view page... i dont get client before or server or client after??? |
Sergey Kornilov 6/1/2021 | |
Thank you for pointing, we'll fix the typo. Yes, this specific example uses the button. This is just an example that explains the idea of how you can create a PDF file and email it. You can, for instance, add this kind of button to the View page and also add the code to Javascript OnLoad event that would click this button programmatically after the page is loaded. |
M
|
Michael Perry author 6/1/2021 |
Thank you as always.!!! this is why i have been with you for almost 13 years! |
M
|
Michael Perry author 6/10/2021 |
I had marked this solved but i can't get past this error... I am on the view page working on a button. Microsoft VBScript runtime error '800a01a8' Object required: 'mail' /buttonhandler.asp, line 101 Client Before: ajax.addPDF( 'pdf', {}, function() { SERVER path = button.saveTempFile( params("pdf") ) |