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
Trying to find contacts associated with a particular job
Hello,
I am attempting to return all the jobs associated with a particular contact. I am attempting to search through the customers, here is the code (C# .NET 2.0):
SearchMultiSelectField searchMult = new SearchMultiSelectField();
List<RecordRef> lstRef = new List<RecordRef>();
RecordRef rr = new RecordRef();
rr.internalId = "7558";
rr.type = RecordType.contact;
rr.typeSpecified = true;
lstRef.Add(rr);
searchMult.searchValue = lstRef.ToArray();
searchMult.@operator = SearchMultiSelectFieldOperator.anyOf;
searchMult.operatorSpecified = true;
ContactSearchBasic contactSearch = new ContactSearchBasic();
contactSearch.internalId = searchMult;
CustomerSearch custSearch = new CustomerSearch();
custSearch.contactJoin = contactSearch;
SearchResult sr = nsSvc.search(custSearch);
7558 is an internal ID of a contact that I have verified is associated with a job. Unfortunately the result doesn't find any matching records. What am I doing wrong?