Discussions
Here are some examples to get your creative juices flowing.
"Did I pay vendor John Doe last month?"
"Take me to my largest sales order for this month."
"What invoices haven't been paid yet?"
Run a function on button click
I want run a Script on a button click (because you cannot run a function in your script ona button click) I've followed the Suitescript documentation and am only able to get the first like (a log line) to run. Any idea?
` form.setScript('customscript_toloader') form.addButton('custpagetestbutton', 'TEST button', 'createTO();');`
-Other script
function createTO() //(request, response)
{
alert("This function was called");
//variable set up
nlapiLogExecution('DEBUG', 'script', 'runs 1');
var POID ;
var POType ;
var PORecord;
var lines;
nlapiLogExecution('DEBUG', 'script', 'runs 2');
var arrayName = new Array();
var arrayQty = new Array();
PORecord = nlapiGetNewRecord();
lines = PORecord.getLineItemCount('item');
POID = nlapiGetRecordId();