Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
NetSuite has launched SuiteSuccess Wholesale Distribution Edition, in Japan. Please join us the webinar on February 12 that introduces NetSuite solution with demos and case studies for Wholesale Industry.
Register Now
Script error - Record type mismatch
We're trying to create a basic, item specific, pop up alert when certain items are selected on a Sales Order. This involves two custom fields on the item record, a check box and text field. If the box is checked, the custom text is displayed in a pop up box.
The script below fails with a SSS_record_type_mismatch' error, when anything other than a 'Inventory Item' is selected:
function myValidateLine(type)
{
var itemID = nlapiGetCurrentLineItemValue('item', 'item');
var itemRec = nlapiLoadRecord('inventoryitem', itemID);
var isChecked = itemRec.getFieldValue('custitem1');
var alert_information = itemRec.getFieldValue('custitem2');
if (isChecked == 'T'){
alert (alert_information);