Discussions
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; }