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.
Multiselect box Validation
Hi, we have a BIG problem trying to validate multiselect box fields with client suitescripts in IE6 & IE7. I tried two codes,
Field Change Funtion:
function onChangeFunc(type, name){
if (name='custentity_partners'){
var multi = nlapiGetFieldValue('custentity_partners');
if (multi && multi.length > 6){
alert('Warning: You can only select 6 partners');
nlapiSetFieldValue('custentity_partners',multi.slice(0,multi.length -1),false);
}
}
}
Field Validate Function:
function onValidateFunc(type,name){
if (name='custentity_partners'){
var multi = nlapiGetFieldValue('custentity_partners');
if (multi && multi.length > 6){
alert('Warning: You can only select 6 partners');
return false;
}
}
return true
}
IE send an alert every time the mouse moves after the condition is reached at once.