Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
Don’t miss your chance to meet our SuiteGurus—NetSuite Support professionals and subject matter experts with extensive experience in select product areas, including OneWorld, Advanced & Basic Accounting, Supply Chain Management, Receivables & Payables, CRM, Account Administration, and the SuiteCloud Platform. Full Conference attendees can prebook exclusive 30-minute one-on-one sessions for your product questions.
Spots are limited! Register through your Agenda Builder and find SuiteGuru under Agenda Enhancements.
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