Using SuiteScript JavaScript. I have a dropdown box that displays supplier data that is sourced from a custom table in Netsuite. The goal here is to reorder the way the supplier data is viewed. For example, currently the supplier data is displayed: SupplierNumber SupplierName (1230 - APEX). UI Screenshot The desired view for the supplier dropdown is the reverse of that: SupplierName SupplierNumber (APEX - 1230). The variable highlighted is the internal ID of the table sourcing the Supplier dropdown field supplierField variable: var supplierField = form.addField('custpage_supplier', 'select', 'Supplier', 'customrecord_reorder_suppliers').setLayoutType('startrow'); Any guidance will be greatly appreciated. I have tried using different methods such as split(' ').reverse().join(' ') on that table object but it did not work.
Using SuiteScript JavaScript. I have a dropdown box that displays supplier data that is sourced from a custom table in Netsuite. The goal here is to reorder the way the supplier data is viewed. For example, currently the supplier data is displayed: SupplierNumber SupplierName (1230 - APEX). UI Screenshot The desired view for the supplier dropdown is the reverse of that: SupplierName SupplierNumber (APEX - 1230). The variable highlighted is the internal ID of the table sourcing the Supplier dropdown field supplierField variable: var supplierField = form.addField('custpage_supplier', 'select', 'Supplier', 'customrecord_reorder_suppliers').setLayoutType('startrow'); Any guidance will be greatly appreciated. I have tried using different methods such as split(' ').reverse().join(' ') on that table object but it did not work.
Using SuiteScript JavaScript. I have a dropdown box that displays supplier data that is sourced from a custom table in Netsuite. The goal here is to reorder the way the supplier data is viewed. For example, currently the supplier data is displayed: SupplierNumber SupplierName (1230 - APEX). UI Screenshot The desired view for the supplier dropdown is the reverse of that: SupplierName SupplierNumber (APEX - 1230). The variable highlighted is the internal ID of the table sourcing the Supplier dropdown field supplierField variable: var supplierField = form.addField('custpage_supplier', 'select', 'Supplier', 'customrecord_reorder_suppliers').setLayoutType('startrow'); Any guidance will be greatly appreciated. I have tried using different methods such as split(' ').reverse().join(' ') on that table object but it did not work.
I have a dropdown box that displays supplier data that is sourced from a custom table in Netsuite. The goal here is to reorder the way the supplier data is viewed.
For example, currently the supplier data is displayed: SupplierNumber SupplierName (1230 - APEX). UI Screenshot
The desired view for the supplier dropdown is the reverse of that: SupplierName SupplierNumber (APEX - 1230).
The variable highlighted is the internal ID of the table sourcing the Supplier dropdown field supplierField variable: var supplierField = form.addField('custpage_supplier', 'select', 'Supplier', 'customrecord_reorder_suppliers').setLayoutType('startrow');
Any guidance will be greatly appreciated.
I have tried using different methods such as split(' ').reverse().join(' ') on that table object but it did not work.
Transcribed Image Text:var today = (date.getMonth() + 1) + '/' + (date.getDate()) + '/'
+ (date.getYear() + 1900);
var form = nlapiCreateForm ('Demand Order');
form.setScript('customscript_cl_dp_order_items');
form.addSubmit Button('Place Order');
form.addButton('custbutton_altview',
form.addButton('custbutton_export_csv',
// Show Gap Fill button when you have a specific role
if (specialRoles.indexOf(ctx.getRoleId()) > -1 && !isNullOrEmpty (supplier))
{
}
else
{
var gapLabel = (gapFill == 'T')? 'Remove Gap Fill' : 'Add Gap Fill';
form.addButton('custbutton_gapfill', gapLabel, 'addGapFill');
var demandLabel = (altDemand == 'T') ? 'Use OG Demand': 'Use Demand B';
form.addButton('custbutton_altdemand', demandLabel, 'changeDemand');
'Change View', 'changeView');
'Export to CSV', 'exportCSV');
gapFill= 'F';
{
}
var branchField = form.addField ('custpage_branch', 'select', 'Branch').setLayout Type('normal', 'startcol').setMandatory(false);
var dateField = form.addField('custpage_date', 'date', 'Order Date').setMandatory (true);
}
var msgField = form.addField('custpage_message', 'inlinehtml', 'Message');
var supplierField = form.addField ('custpage_supplier', 'select', 'Supplier', 'customrecord_reorder_suppliers').setLayout Type('startrow');
var supplierLeadField = form.addField ('custpage_supplier_lead_time', 'text', 'Supplier Lead Time').setDisplayType('hidden');
var potoField = form.addField('custpage_po_or_to', 'select', 'PO/TO').setDisplayType('hidden');
var qtyField = form.addField ('custpage_qty', 'integer', 'Total Qty.').setDisplayType('inline').setLayout Type('normal', 'startcol');
var weightField = form.addField ('custpage_weight', 'integer', 'Total Weight').setDisplayType('inline');
var itemField = form.addField ('custpage_item', 'select', 'Item', 'inventoryitem');
var reorderField = form.addField ('custpage_reorder', 'checkbox', 'At or below reorder');
var reorderPointCalcField = form. addField ('custpage_reorder_calc', 'text', 'Reorder Point Calculation (Only Applies to Auto)').setDisplayType('inline').set Layout Type ('normal', 'startcol');
var stockLevelCalcField = form.addField ('custpage_stock_level_calc', 'text', 'Preferred Stock Level Calculation (Only Applies to Auto)').setDisplayType('inline')
var plannerField = form.addField ('custpage_planner', 'select', 'Planner', 'employee').setDisplayType('inline');
var savedField = form.addField ('custpage_selected_lines', 'longtext', 'Selected IDs').setDisplayType('hidden');
var submitField = form.addField ('custpage_submit', 'checkbox', 'Ready to Submit').setDisplayType('hidden');
var viewField = form.addField ('custpage_altview', 'checkbox', 'Alt View').setDisplayType('hidden');
var gapField = form.addField('custpage_gapfill', 'checkbox', 'Gap Fill').setDisplayType('hidden');
var altDemandField = form.addField('custpage_altdemand', 'checkbox', 'Alt Demand View').setDisplayType('hidden'); // demandB
// Hide "select a supplier" message when the supplier has been selected and set Planner field if Branch is selected
if(!isNullOrEmpty(supplier))
msgField.setDisplayType('hidden');
// demandB
// demandB
supplierField.setLayout Type('startrow');
if(isNullOrEmpty (branch)){
}
nlapiLogExecution ('debug', 'Setting planner', 'Setting planner field');
setPlannerField (plannerField, supplier, branch);
potoField.addSelectOption ('', '');
Transcribed Image Text:Demand Order
Place Order
BRANCH
C7702 - Houston
ORDER DATE*
8/25/2022
** To begin, select a supplier
SUPPLIER
- New -
105 AtlasBX Co., LTD
1230 - APEX
1240 - BE
1250 - BSI
1260 - BX
Export to CSV
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.