I have placed a button doing the following in onRecord event:
$link = sc_make_link(generate_voucher, receipt_id={receipt_id});
{gen_v} = '<button class="scButton_default" type="button" name="generate_receipt" onclick="' . $link . '">Generate Voucher</button>';
When I click the button I get:
Uncaught SyntaxError: Invalid regular expression flags
What I want to do is to execute a PHP script in a blank application generate_voucher when the button is clicked.
Also, how to reference the {receipt_id} in the blank application onExecute script?
If possible, can I place the script inside the onRecord and call it when the button is clicked instead of using a blank application?