Discussions
Searching for Jobs associated with a specific contact
I'm looking for a way to return all the jobs associated with a contact. Currently I am trying to search for customer that hasa contact who's ID matches the one I am looking for. Here's the code:
var arrSearchCols = new Array();
arrSearchCols[0] = new nlobjSearchColumn('internalid');
var arrSearchFilter = new Array();
arrSearchFilter[0] = new nlobjSearchFilter('internalid', 'contact', 'equalTo', strContactId);
return nlapiSearchRecord('customer', null, arrSearchFilter, arrSearchCols);
Here strContactId is the internal id of the contact I am filtering on. However when I use known contact ID's the search returns NULL. What am I doing wrong?