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!
Return Employee ExternalId with Timesheet Advanced Search
I'm running an advanced search for timesheets but in order to map back to our other systems I need to return the external id of the employee.
The current C# function is like this
public List<TimeSheet> FindTimesheetsByLastModified(DateTime lastModified) { TimeSheetSearchAdvanced tsa = new TimeSheetSearchAdvanced() { criteria = new TimeSheetSearch() { timeEntryJoin = new TimeEntrySearchBasic() { lastModified = new SearchDateField() { @operator = SearchDateFieldOperator.after, operatorSpecified = true, searchValue = lastModified, searchValueSpecified = true } } } }; SearchResult result = _service.search(tsa); if (!result.status.isSuccess) { throw new ApplicationException("Timesheet search failed", EnumerateErrorsToException(result.status.statusDetail)); } List<TimeSheet> records = result.recordList.Select(t => (TimeSheet)t).ToList(); return records; }
Tagged:
0