*/define([], function () {/*** Defines the Portlet script trigger point.* @param {Object} params – The params parameter is a JavaScript object. It is automatically passed to the script entry* point by NetSuite. The values for params are read-only.* @param {Portlet} params.portlet – The portlet object used for rendering* @param {string} params.column – Column index forthe… Continue reading Sample Portlet Script to add Icons on the Dashboard.
Author: Bibin Babu
Custom Survey form using HTML and CSS
This HTML and CSS script can fetch details from the NetSuite like customer details and Inventory details on a realtime basis.
Function to add standard NetSuite Customer Quickadd form onto a Suitelet Using HTML.
Crystal Points Program Reward Solution for NetSuite
Proposal Summary The proposed solution aims to integrate a customized reward system into NetSuite. This program will automatically grant credits to customers based on their membership tier and reward level. The solution will consist of three tiers (PARTNER, AFFILIATE, ASSOCIATE) and five reward levels within each tier (STANDARD, SILVER, GOLD, PLATINUM, DIAMOND). Deliverables This proposed… Continue reading Crystal Points Program Reward Solution for NetSuite
Custom survey form using suitelet
// Adding an Inline HTML field for the questionnairevar inlineHtmlField = form.addField({id: ‘custpage_questionnaire’,type: serverWidget.FieldType.INLINEHTML,label: ‘questionnaire’});
Activity Saved Search > Ability to get the number of days a task is opened
This can be done by adding a Formula(Numeric) that uses formula string shown below. REGEXP_SUBSTR({completeddate}-{date}, ‘[^ ]+’) Here are the steps:I. Create an activity saved search.1. Navigate to Lists > Search > Saved Searches > New.2. Click Activity.3. In the Criteria tab, set Status= is any of Completed, In Progress, Not Started4. In the Results tab, add Formula(Numeric) | REGEXP_SUBSTR({completeddate}-{date}, ‘[^ ]+’)5. Click Save & Run.This… Continue reading Activity Saved Search > Ability to get the number of days a task is opened
Properly Making Radio buttons Mandatory on Suitelets
Create a Suitelet like the one below: function mySuitelet(request, response){ if(request.getMethod() == ‘GET’) { var form = nlapiCreateForm(‘my form’); form.addField(‘custpage_radio’, ‘radio’, ‘Alpha’, ‘a’); form.addField(‘custpage_radio’, ‘radio’,’Beta’,’b’); form.addField(‘custpage_radio’, ‘radio’,’Charlie’,’c’); form.addField(‘custpage_radio’, ‘radio’, ‘Delta’, ‘d’); form.getField(‘custpage_radio’, ‘a’).setMandatory(true); var machine = form.addSubList(‘custpage_mysublist’, ‘inlineeditor’, ‘my sublist’); var selectField = machine.addField(‘myselectfield’, ‘select’, ‘My Select Field’); selectField.addSelectOption(‘1’, ‘One’); selectField.addSelectOption(‘2’, ‘Two’); selectField.addSelectOption(‘3’, ‘Three’); form.addSubmitButton(‘submit’); response.writePage(form); } else { }} After that, run/launch the Suitelet. Without making any selection, click Submit. The form would be… Continue reading Properly Making Radio buttons Mandatory on Suitelets
Display Print a Price List Link on the Customer Center / My Account Page
From a standardCustomer Center role, the Print a PriceList link is purposely hidden, so this is an intended functionality. To display the link on the Customer Center/My Account page (Web Store), user needs to customize the Customer Center role to enable permission to view Print a Price List link. a. Navigate to Setup > Users/Roles> Manage Rolesb. Customize the Standard Customer Center… Continue reading Display Print a Price List Link on the Customer Center / My Account Page
Merge a PDF file from the File Cabinet using nlapiXMLtoPDF
Using ‘pdfset’ element, another file can be merged as another page using the ‘src’ attribute where the URL of the file can be indicated.*** Note that the ‘Available without login’ must be checked on the file record for this to work. Sample code snippet: ====================== function xmltoPDF_pdfSet(request, response){ var xml = “<?xml version=\”1.0\”?>\n<!DOCTYPE pdf PUBLIC \”-//big.faceless.org//report\” \”report-1.1.dtd\”>\n”; xml +=… Continue reading Merge a PDF file from the File Cabinet using nlapiXMLtoPDF
Steps to Put More Space Between Two Body Fields
To create a space between 2 fields, create an invisible Custom Field in between them: 1. Navigate to Customization > Lists, Records, & Fields > select the type of Custom Field > New.2. Enter Label for the field.3. Type = Inline HTML4. Under Applies To > mark the box that corresponds to the record or transaction type where you want to place the custom field.5. Under Display > Subtab = select the subtab where the user want to… Continue reading Steps to Put More Space Between Two Body Fields