Guidelines for Creating a Dashboard SuiteApp Icon

Dashboard SuiteApp icons require certain visual characteristics to align them with other icons in the dashboard. The following guidelines preserve the visual characteristics of Dashboard SuiteApp icons: Dashboard SuiteApp icons use a unique background with a cloud motif. This background ensures a common size and shape for all Dashboard SuiteApp icons and provides a cloud… Continue reading Guidelines for Creating a Dashboard SuiteApp Icon

Portlet Script Type

Simple Form – A data entry form that can include a submit button embedded into a portlet. This type supports the N/portlet module that can refresh and resize the portlet, as well as use record-level client script to implement validation. See N/portlet Module. Inline HTML – An HTML-based portlet that is used to display free-form HTML such as… Continue reading Portlet Script Type

SuiteQL: Retrieve Top-Selling Items

SELECT item.itemid,         SUM(transactionlines.quantity) AS total_sold  FROM transaction  INNER JOIN transactionlines  ON transaction.id = transactionlines.transaction  INNER JOIN item  ON transactionlines.item = item.id  WHERE transaction.type = ‘SalesOrd’  AND transaction.status = ‘SalesOrd:B’  GROUP BY item.itemid  ORDER BY total_sold DESC  LIMIT 10; Identifies the top 10 best-selling items based on quantities sold (SUM(transactionlines.quantity)). Filters billed sales… Continue reading SuiteQL: Retrieve Top-Selling Items

SuiteQL: Join Tables-Transactions and Items

SELECT transaction.tranid AS sales_order,         item.itemid AS item_name,         transactionlines.quantity AS quantity_sold  FROM transaction  INNER JOIN transactionlines  ON transaction.id = transactionlines.transaction  INNER JOIN item  ON transactionlines.item = item.id  WHERE transaction.type = ‘SalesOrd’  AND transaction.trandate BETWEEN {today}-90 AND {today}; Combines data from transaction, transactionlines, and item tables using INNER JOIN. Fetches sales… Continue reading SuiteQL: Join Tables-Transactions and Items

SuiteQL: Filter Transactions by Date Range

SELECT tranid, entity, trandate, total  FROM transaction  WHERE type = ‘SalesOrd’  AND trandate BETWEEN {today}-30 AND {today}  ORDER BY trandate DESC; Retrieves all Sales Orders (type = ‘SalesOrd’) created in the last 30 days. The trandate filter ensures only transactions within the specified date range are included. Results are sorted in descending order of trandate,… Continue reading SuiteQL: Filter Transactions by Date Range

Applying logic to button Make Copy

const lineIsCopied = () => { let lineNumber = opportunity.getCurrentSublistValue({ sublistId: ‘item’, fieldId: ‘line’ }); if (lineNumber) { //linenumber is existing this means line is not a copy return false; } else { //linenumber is empty this mean line is a copy return true; } };

Optimizing SuiteScript Performance

There are certain changes you can make to your scripts to ensure the execute with performance in mind. This may be particularly true for custom scripts. You can see if there are custom scripts in your account at Customization > Scripting > Scripts. The following guidelines are suggested to optimize script performance: General Scripting Guidelines Accessing… Continue reading Optimizing SuiteScript Performance