Discussions
Join the NetSuite community to innovate, connect, and discover what’s next.
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Register now
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.