Ah.. I think I approached the problem from a different angle, and don't understand what angle you are using..
For my pdfIt function, this is the code I am using
function GenInvoice() {
var myID = document.getElementById('recordID').value;
pdfIt('INV',myID);
}
Then I have an extra button that just calls GenInvoice() when I press it..
I wasn't aware that any field on the edit screen can be used as a hash variable.. That's really cool!
But that leaves my next question..
Where would I use that query string you demonstrated above in my JavaScript function (or anywhere else) to fill in my emailIt(pRecord,pto ....) function?
currently, I have a second JavaScript function on my form in custom code called SendINV() with the code as follows:
function sendINV() {
var myID = document.getElementById('recordID').value;
var pTo = '
anorman@superdata.com';
var pFrom = '
reports@superdata.com';
var pSubject = 'Invoice #' + myID;
var pMessage = 'Here is the Invoice';
var pFilename = myID;
emailSendIt('INV',pTo,pFrom,pSubject,pMessage,pFilename,'TRUE','PDF');
}
And then another button in "extra action buttons" that just calls this function..
The GenInvoice() function that shows the pdf invoice has worked perfectly for a while.. I'm at a loss to understand how to send the invoicenumber (in_num) to the emailSendIt function, however..
I even tied appending the 'INV' in the first field above (Which is the correct name for the report I want to email) with 'INV&printIt0=INV&printIt1=' + myID but that didn't work..
I have a feeling you have another way to call that function that I am completely misunderstanding, or not seeing altogether, as I don't have a clue where you would put the #in_num# hash variable or the $query = . " where in_num = #in_num" code anywhere..
Sorry, I'm feeling really stupid right about now.. I think I have the programming equivalent to writers block or something
