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?"
NSC | SuiteScript: Send Saved Search Results in a tabular form via email using HTML
Scenario
The user wants to send the results of a saved search via email body using a simple HTML table.
Solution
/**
* @NApiVersion 2.x
* @NScriptType ScheduledScript
* @NModuleScope SameAccount
*/
define(["N/file","N/search","N/email"],
function(file, search, email) {
/**
* Definition of the Scheduled script trigger point.
*
* @param {Object} scriptContext
* @param {string} scriptContext.type - The context in which the script is executed. It is one of the values from the scriptContext.InvocationType enum.
* @Since 2015.2
*/
function execute(scriptContext) {
var columns = new Array();
var htmlString = '';
columns[0] = search.createColumn({name: "internalid", label: "Internal ID"});
columns[1] = search.createColumn({name: "item", label: "Item"});
Refer a Member to the Community | Earn the Answer Accepter Badge | Vote for the contents you'd like to see