Hopefully someone can help. I cannot figure out how to use this API and the code examples have not been helpful.
I am currently getting a list of TimeBill records for a given date range so I can add up the time. The TimeBill type has an RecordRef type for employee that gets populated with basic employee data during my search (employee data returned: externalId, internalId, name, type, typeSpecified). However, it does not contain additional employee data. Specifically, I need the customFieldList[] of each employee associated with each TimeBill record so I can get at a customId number for the employee.
Here is my simple code to get TimeBill records:
TimeBillSearch search = new TimeBillSearch();
TimeBillSearchBasic searchBasic = new TimeBillSearchBasic();
SearchDateField searchDateField = new SearchDateField();
searchDateField.@operator = SearchDateFieldOperator.within;
searchDateField.operatorSpecified = true;
searchDateField.searchValue = DateTime.Now(2016,1,1);
searchDateField.searchValueSpecified = true;
searchDateField.searchValue2 = DateTime.Now(2016,11,1);
searchDateField.searchValue2Specified = true;
searchBasic.dateCreated = searchDateField;
search.basic = searchBasic;
SearchResult result = _service.search(search); //perform search
double time = result.recordList[0].hours.timeSpan //get time for first record
string empName = result.recordList[0].employee.name; //get employee name for first record
string empCustomId = result.recordList[0].employee. (here I need to access additional employee data that would be found on the Employee type- ie, customFieldList)
How do I access the data I need within the TimeBillSearch context, or is there a different way to do this?
Please answer as I have spent so long trying to find this out and there's nothing online.