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.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Retrieve list of custom fields in job search.
I have been trying to retrieve a list of jobs with certain custom fields without much luck. Although below code runs without any errors the custom field list is empty in the response object.
If I run just a basic search without naming individual fields, all are returned including all custom fields.
Do I have to run this as 2 searches first basic than custom?
Any help greatly appreciated.
_netSuite = new NetSuiteService(); var jsa = new JobSearchAdvanced(); var jsb = new JobSearchBasic(); var searchStatus = new SearchMultiSelectField() { operatorSpecified = true, @operator = SearchMultiSelectFieldOperator.anyOf, searchValue = _settings.SelectedStatuses.Split(',').Select(s => new RecordRef() { internalId = s }).ToArray(), }; jsb.status = searchStatus; if (!_settings.IncludeInactiveProjects) { jsb.isInactive = new SearchBooleanField() { searchValue = _settings.IncludeInactiveProjects, searchValueSpecified = true }; } var searchRow = new JobSearchRow(); var searchRowBasic = new JobSearchRowBasic(); searchRow.basic = searchRowBasic; jsa.columns = searchRow; jsa.criteria = new JobSearch(){basic = jsb} ; searchRowBasic.companyName = new SearchColumnStringField[1] { new SearchColumnStringField() { } }; searchRowBasic.internalId = new SearchColumnSelectField[1] { new SearchColumnSelectField() { } }; searchRowBasic.dateCreated = new SearchColumnDateField[1] { new SearchColumnDateField() { } }; searchRowBasic.entityStatus = new SearchColumnSelectField[1] { new SearchColumnSelectField() { } }; searchRowBasic.customFieldList = new 0