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.
Problems with nlapiSearchDuplicate on customer form
Hi,
I have a problem: In my custom customer form, i've custom field. This field is a mandatory field: custentity4.
I want to validate this field from suitescript, but when i execute this script on my custom customer form, i've this error:
"An unexpected error occurred in a script running on this page.
validaCamposBody (validateField)
customform
SSS_INVALID_SRCH_FILTER
An nlobjSearchFilter contains invalid search criteria: 3."
My SuiteScript is:
function validaCamposBody(type, name)
{
//Valida duplicidad de clientes por campo RUC
if (name == 'custentity4')
{
var arraySearch = new Array();
arraySearch[0] = nlapiGetFieldValue('custentity4');
var duplicateRUC = nlapiSearchDuplicate('customer',arraySearch);
if (duplicateRUC.lenght >= 1)