14 minutes Read

Published On

Use the Shipping Item List as a Select Option in a Suitelet

Following is the tutorial taken from SuiteAnswers which shows how to create a select field having Shipping Items/Shipping Methods in Suitelet:

Use the Shipping Item List as a Select Option in a Suitelet

  1. Create a custom record type

    • Navigate to Customization > Lists, Records, & Fields > Record Types > New
    • Set the name – Shipping List
    • Set the ID – _rec_ship_list
    • Access type = no Permission Required
    • Save
  2. Add a custom field that will source the Shipping Item List

    • Edit the Record created from Part A.
    • Click on new field
    • Set the name – shipping item list
    • Set the ID – _shipping_list  
    • Type = List/Record
    • List/Record = Shipping Method
    • Save
  3. Create a new Record (Shipping List)

    • Open the custom record (Shipping List)
    • Click on View Records
    • Click on new
    • Set a Name to the record and Save
    • Take note of the Internal Id for this new record.
This Custom record will be used to access the shipping items.
 
Suitelet Script that will show a field with the shipping items as the select options.
 
Script:
function demoSimpleForm(request, response) {
    if (request.getMethod() == 'GET') {
        var form = nlapiCreateForm('Simple Form');
        var cusRec = nlapiLoadRecord('customrecord_rec_ship_list', 1);
        var shipFld = cusRec.getField('custrecord_shipping_list');
        var options = shipFld.getSelectOptions();
        var select = form.addField('custpage_selectfield', 'select', 'My Custom shipping item');
        select.addSelectOption('', '');
        for (var i = 0; i < options.length; i++) {
            select.addSelectOption(options[i].id, options[i].text);
        }
        form.addSubmitButton('Submit');
        response.writePage(form);
    } else {
        dumpResponse(request, response);
    }
}
 
This way we can fetch saved search’s name which is impossible by making/invoking saved search on saved search in SuiteScripts.
CTA - NetSuite Real Estate Solution Banner
CTA - NetSuite Shopify Connector Banner
SuiteAnswer Id: 32174
We are NetSuite Official Partner, specialized in NetSuite Implementation, Customization and all sort of integrations. Feel free to Contact Us for any query, or to request a quotation.

Table of Contents

Contact Us

By submitting this form, you agree to our privacy policy and terms of service.

Related resources you might be interested in

Deeper in to NetSuite, Development & Customization
Deeper in to NetSuite, Operations & Supply Chain

We'd love to help you with all your NetSuite needs

Folio3 Your Top Choice:

Middle East Partner 2025
education award 2025
Winner Award
Software and IT Services 2024
Financial-Services-2023
SuiteCommerce 2023

Let's discuss your NetSuite needs

Hello, How can we help you?