Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Not able to source JobType and not able to get JobType in search.
Hi,
I have a customfield in the timeentry form which needs to be sourced from the NetSuite field Job Type(fieldid:jobtype) which is in the Project record.
I tried selecting Project and job in the SourceList and could'nt find the jobtype in the Source From list.
In the serverscript I tried to get this field using a search but its giving an error
Error: JS_EXCEPTION
InternalError: Cannot convert org.mozilla.javascript.NativeArray@f3ba2f
to nlobjSearchColumn[] (afterSaveTime#174)
function getProjectType() { projectType = ""; var cols = new Array(); //cols[1] = new nlobjSearchColumn('jobtype'); cols[1] = new nlobjSearchColumn('type'); var filtersArr = new Array(); filtersArr[0] = new nlobjSearchFilter( 'entityid', null, 'is', projectName, null); var searchResultArr = nlapiSearchRecord('job', null, filtersArr, cols); if (searchResultArr != null) projectType = searchResultArr[0].getValue("type"); return projectType; } 0