function afterSubmit(request, response){ // sends an email to the customer with PDF attached var customer = nlapiGetFieldValue('entity'); var email = nlapiLookupField('customer', customer, 'email'); /* var emailchoice = nlapiLookupField('customer', customer, 'custentityemail_invoice_checkbox_cust'); */ if (email != '' && email != null && customer=='23') { var recordid = nlapiGetRecordId(); var link = 'https://system.netsuite.com/app/site/hosting/scriptlet.nl?script=164&deploy=1&custparamso_id='+ recordid; var recordtype = nlapiGetRecordType(); var template = 29; // Invoice Template ID var mailRec = nlapiMergeRecord(template, recordtype, recordid); // Merge Template Internal Id 3 with Record var records = new Object(); // Create a new record object records['transaction'] = recordid; // Declaring a Transaction Record var attachment = nlapiPrintRecord('TRANSACTION', recordid, 'pdf', null); // Print the Merged Record as PDF var loadrecord = nlapiLoadRecord(recordtype, recordid); // Load the Record nlapiSendEmail(-5, 'aaron@shorai.org', 'new promo for approval',<a href=link>approve</a> +' '+ mailRec.getValue(), null,null,records,attachment); } }I can't get the system to mask my link around "approve" While I'm here I should also ask, how do I embed my transaction details into this email? I get that I would need to parse the results into a container and place the container into the email, but I don't have any specific examples where they did this in suiteanswers. Special thanks to khultquist for the base code!Also I read around that It would be possible to make my suitelet execute without needing to open a new browser window? how can I do that?