EmployeeQuery

Returns employee data. Notice that prior to qbXML spec 4.0, an EmployeeQueryRq would return a permissions error if the currently logged in QuickBooks user did not have “Payroll and Employees” permission. This would occur even if you only needed data that was not restricted.
However, because of IncludeRetElement (beginning with qbXML spec 4.0), the situation has changed somewhat. You can use that new element to specify fields in the EmployeeRet object that do not require “Payroll and Employees” permissions. Such a query would return the unrestricted data (such as Name) from an EmployeeQueryRq even if the logged in user lacks “Payroll and Employees” permissions.

Request

Response

XMLOps

VB.NET

C#

Tag Type Max length Implementation Required

IEmployeeQuery

Returns employee data. Notice that prior to qbXML spec 4.0, an EmployeeQueryRq would return a permissions error if the currently logged in QuickBooks user did not have “Payroll and Employees” permission. This would occur even if you only needed data that was not restricted. However, because of IncludeRetElement (beginning with qbXML spec 4.0), the situation has changed somewhat. You can use that new element to specify fields in the EmployeeRet object that do not require “Payroll and Employees” permissions. Such a query would return the unrestricted data (such as Name) from an EmployeeQueryRq even if the logged in user lacks “Payroll and Employees” permissions.
       

metaData

This is used in a query to cause a count of query objects to be returned. You can specify that the count of query objects is to be returned with the returned objects, or you can specify that only a count and no data is returned. (The default is that no count is returned.) A common use of this feature is to specify a count with no data in order to determine how many objects to expect from the actual query. If you don’t want a query to return a count, either don’t use this feature, or specify the value NoMetaData. If you want only a count, specify the value MetaDataOnly. If you want data and a count, specify MetaDataAndResponseData. You should be aware that the count returned via this setting is not guaranteed to be exact: it could be off slightly due to new object creation or deletions.
IQBENmetaDataType   4.0 us.png  

ORListQuery

IORListQuery      

ListIDList

One or more ListID values. Along with FullName, ListID is a way to identify a list object. When a list object is added to QuickBooks through the SDK or through the QuickBooks user interface, the server assigns it a ListID. A ListID is not unique across lists, but it is unique across each particular type of list. For example, two customers could not have the same ListID, and a customer could not have the same ListID as an employee (because Customer and Employee are both name lists). But a customer could have the same ListID as a non-inventory item.
IBSTRList      

FullNameList

A list of one or more FullName values. FullName (along with ListID) is a way to identify a list object. The FullName is the name prefixed by the names of each ancestor, for example Jones:Kitchen:Cabinets. FullName values are not case-sensitive.
IBSTRList      

ListFilter

The IListFilter group object allows you to search according to active status, modification date, and name.
IListFilter      

MaxReturned

Limits the number of objects that a query returns. (To get a count of how many objects could possibly be returned, use the metaData query attribute.) If you include a MaxReturned value, it must be at least 1.
IQBIntType      

ActiveStatus

Used in filters to select list objects based on whether or not they are currently enabled for use by QuickBooks. The default value is asActiveOnly, which selects only list objects that are active.
IQBENActiveStatusType      

FromModifiedDate

Selects objects modified on or after this date. See the note below regarding QBFC usage.For desktop versions of QuickBooks, the FromModifiedDate and ToModifiedDate must be between 1970-01-01 and 2038-01-19T03:14:07 (2038-01-18T19:14:07-08:00 PST). (The time portion of the field was not supported in qbXML version 1.0 or 1.1.) Also, for desktop versions of QuickBooks, if FromModifiedDate includes a date but not a time (for example, if you set FromModifiedDate to 2003-02-14), the time is assumed to be zero (2003-02-14T00:00:00). If you omit FromModifiedDate, it will be set to 1970-01-01T00:00:00 (1969-12-31T16:00:00-08:00 PST).For QBOE, the FromModifiedDate and ToModifiedDate must be between 1900-01-01T00:00:00 and 9999-12-31T00:00:00. If FromModifiedDate includes a date but not a time (for example, if you set FromModifiedDate to 2003-02-14), the time is assumed to be zero (2003-02-14T00:00:00). If you omit FromModifiedDate, it will be set to 1900-01-01T00:00:00.Note: When specifying this in QBFC, you need to supply the parameter asDateOnly, which is a Boolean. If asDateOnly is true, the date value will be represented as a date only (without a time). If asDateOnly is false, the date value will be represented as date and time, padded with zeros if necessary, and set to the beginning of the day if no time is provided. The asDateOnly parameter is especially useful in the ToModifiedDate field of a query: If asDateOnly is set to true in the ToModifiedDate field of a query, then the query includes elements modified up to the end of the day. If asDateOnly is false, the query includes elements modified up to the specified time (or up to the beginning of the day if no time is included).
IQBDateTimeType      

ToModifiedDate

Selects objects modified on or before this date. See the note below on QBFC usage.For desktop versions of QuickBooks, the ToModifiedDate and FromModifiedDate must be between 01/01/1970 and 2038-01-19T03:14:07 (2038-01-18T19:14:07-08:00 PST). (Note that the time portion of the field was not supported in qbXML version 1.0 or 1.1.) If ToModifiedDate includes a date but not a time (for example, if you set ToModifiedDate to 2003-02-14), the time is assumed to be the end of the day (2003-02-14T23:59:59). If you omit ToModifiedDate altogether, it will be set to 2038-01-19T03:14:07 (2038-01-18T19:14:07-08:00 PST).For QBOE, the ToModifiedDate and FromModifiedDate must be between 01/01/1900 and 9999-12-31T00:00:00. If ToModifiedDate includes a date but not a time (for example, if you set ToModifiedDate to 2003-02-14), the time is assumed to be the end of the day (2003-02-14T23:59:59). If you omit ToModifiedDate altogether, it will be set to 9999-12-31T00:00:00.Note: When specifying this in QBFC, you need to supply the parameter asDateOnly, which is a Boolean. If asDateOnly is true, the date value will be represented as a date only (without a time). If asDateOnly is false, the date value will be represented as date and time, padded with zeros if necessary, and set to the beginning of the day if no time is provided. The asDateOnly parameter is especially useful in the ToModifiedDate field of a query: If asDateOnly is set to true in the ToModifiedDate field of a query, then the query includes elements modified up to the end of the day. If asDateOnly is false, the query includes elements modified up to the specified time (or up to the beginning of the day if no time is included).
IQBDateTimeType      

ORNameFilter

IORNameFilter      

NameFilter

Filters according to the object’s Name.
INameFilter      

MatchCriterion

The criterion to match.
IQBENMatchCriterionType     Y

Name

The string to match.
IQBStringType     Y

NameRangeFilter

Filters according to the object’s Name.
INameRangeFilter      

FromName

The first name or item in the search range. If FromName is omitted, the range will begin with first name on the list.
IQBStringType      

ToName

The final name or item in the search range. If ToName is omitted, the range will end with last name on the list.
IQBStringType      

IncludeRetElementList

You use this if you want to limit the data that will be returned in the response. In this list, you specify the name of each top-level element or aggregate that you want to be returned in the response to the request. You cannot specify fields within an aggregate, for example, you cannot specify a City within an Address: you must specify Address and will get the entire address. The names specified in the list are not parsed, so you must be especially careful to supply valid names, properly cased. No error is returned in the status code if you specify an invalid name. Notice that if you want to return custom data or private data extensions, you must specify the DataExtRet element and you must supply the OwnerID set to either a value of 0 (custom data) or the GUID for the private data.
IBSTRList 50 chars 4.0  

OwnerIDList

Zero or more OwnerID values. OwnerID refers to the owner of a data extension:If OwnerID is 0, this is a public data extension, also known as a custom field. Custom fields appear in the QuickBooks UI.If OwnerID is a GUID, for example {6B063959-81B0-4622-85D6-F548C8CCB517}, this field is a private data extension defined by an integrated application. Private data extensions do not appear in the QuickBooks UI. Note that OwnerID values are not case-sensitive, meaning that if you enter an OwnerID value with lower-case letters, the value will be saved and returned with upper-case letters. When you share a private data extension with another application, the other application must know both the OwnerID and the DataExtName, as these together form a data extension’s unique name.
IGUIDList   2.0  
Tag Type Max length Implementation Required

IResponse

Returns employee data. Notice that prior to qbXML spec 4.0, an EmployeeQueryRq would return a permissions error if the currently logged in QuickBooks user did not have “Payroll and Employees” permission. This would occur even if you only needed data that was not restricted. However, because of IncludeRetElement (beginning with qbXML spec 4.0), the situation has changed somewhat. You can use that new element to specify fields in the EmployeeRet object that do not require “Payroll and Employees” permissions. Such a query would return the unrestricted data (such as Name) from an EmployeeQueryRq even if the logged in user lacks “Payroll and Employees” permissions.
       

StatusCode

A number that corresponds to a statusSeverity and statusMessage. Five status codes relate directly to signon messages: 2000, 2010, 2020, 2030, and 2040. For details about these and other statusCode values that can be returned, see the statusCode table on the Error Codes page.
IQBIntType     Y

StatusSeverity

One of the following values: INFO The request was completed, and the results are consistent with what your application expected. WARNING The request was completed, but the results might not be consistent with what you expected. ERROR The request was not completed. No data will appear in the server’s response after the statusMessage.
IQBStringType     Y

StatusMessage

A user-readable explanation of the success or error condition that is indicated by the statusCode. For details about the statusMessage values that can be returned, see the “Explanation” column of the statusCode table on the Error Codes page.
IQBStringType     Y

retCount

The retCount is returned in a query if in the query request you specified the metaData attribute with a value of MetaDataOnly (in which case the retCount is the only data returned in the query response) or MetaDataAndResponseData (the query response contains object data AND the approximate count). The retCount value contains the approximate count of the objects that could be expected to be returned from the query. A common use of this feature is to specify a count with no data in order to determine how many objects to expect from the actual query. You should be aware that the count returned in retCount is not guaranteed to be exact: it could be off slightly due to new object creation or deletions.
IQBIntType   4.0 us.png Y

Detail

IEmployeeRetList      

(List

of IEmployeeRet Objects)
       

ListID

Along with FullName, ListID is a way to identify a list object. When a list object is added to QuickBooks through the SDK or through the QuickBooks user interface, the server assigns it a ListID. A ListID is not unique across lists, but it is unique across each particular type of list. For example, two customers could not have the same ListID, and a customer could not have the same ListID as an employee (because Customer and Employee are both name lists). But a customer could have the same ListID as a non-inventory item.
IQBIDType     Y

TimeCreated

Time the object was created.
IQBDateTimeType     Y

TimeModified

Time the object was last modified.
IQBDateTimeType     Y

EditSequence

A number that the server generates and assigns to this object. Every time the object is changed, the server will change its EditSequence value. When you try to modify a list object, you must provide its EditSequence. The server compares the EditSequence you provide with the EditSequence in memory to make sure you are dealing with the latest copy of the object. If you are not, the server will reject the request and return an error. Because EditSequence is only used to check whether two objects match, there is no reason to interpret its value.
IQBStringType 16 chars   Y

Name

A concatenation of FirstName, MiddleName, and LastName.
IQBStringType 41 chars   Y

IsActive

If IsActive is true, this object is currently enabled for use by QuickBooks. The default value is true.
IQBBoolType      

Salutation

A formal reference, such as Mr. or Dr., that precedes a name.
IQBStringType 15 chars    

FirstName

The first name of a customer, vendor, employee, or person on the “other names” list.
IQBStringType 25 chars    

MiddleName

The middle name of a customer, vendor, employee, or person on the “other names” list.
IQBStringType 5 chars    

LastName

The last name of a customer, vendor, employee, or person on the “other names” list.
IQBStringType 25 chars    

JobTitle

The job title of a customer, vendor, employee, or person on the “other names” list.
IQBStringType 41 chars 12.0  

SupervisorRef

The name of a customer, vendor, employee, or person on the “other names” list in the employment job details section.
IQBBaseRef   13.0 us.png  

ListID

Along with FullName, ListID is a way to identify a list object. When a list object is added to QuickBooks through the SDK or through the QuickBooks user interface, the server assigns it a ListID. A ListID is not unique across lists, but it is unique across each particular type of list. For example, two customers could not have the same ListID, and a customer could not have the same ListID as an employee (because Customer and Employee are both name lists). But a customer could have the same ListID as a non-inventory item.
IQBIDType   13.0 us.png  

FullName

FullName (along with ListID) is a way to identify a list object. The FullName is the name prefixed by the names of each ancestor, for example Jones:Kitchen:Cabinets. FullName values are not case-sensitive.
IQBStringType 209 chars 13.0 us.png  

Department

The name of the department in the employment job details section.
IQBStringType 31 chars 13.0 us.png  

Description

The description details in the employment job details section.
IQBStringType 64 chars 13.0 us.png  

TargetBonus

The target bonus amount in the employment job details section.
IQBAmountType   13.0 us.png  

EmployeeAddress

If an address request fails, some combination of address fields might be too long. If you use payroll, you must specify the employee’s city, state (or province), ZIP (or postal) code, and at least one line of the street address. (Note that the State element has restrictions when it’s used in the EmployeeAddress aggregate. For more information, click State in the table.)
IEmployeeAddress      

Addr1

The first line of an address.
IQBStringType 41 chars    

Addr2

The second line of an address (if a second line is needed).
IQBStringType 41 chars    

City

The city name in an address.
IQBStringType 31 chars    

State

When it appears in the EmployeeAddress aggregate, the State element acts like an ENUMTYPE with the following possible values: None, AA (military), AE (military), AK, AL, AP (military), AR, AZ, CA, CO, CT, DC, DE, FL, GA, HI, IA, ID, IL, IN, KS, KY, LA, MA, MD, ME, MI, MN, MO, MS, MT, NC, ND, NE, NH, NJ, NM, NV, NY, OH, OK, OR, PA, PR, RI, SC, SD, TN, TX, UT, VA, VT, WA, WI, WV, and WY.
IQBStringType 21 chars    

PostalCode

The postal code in an address.
IQBStringType 13 chars    

PrintAs

By default within QuickBooks, the PrintAs element is the same as the Name element.
IQBStringType 41 chars    

Phone

The telephone number.
IQBStringType 21 chars    

Mobile

Mobile telephone number.
IQBStringType 21 chars 2.1  

Pager

The pager number.
IQBStringType 21 chars 2.1  

PagerPIN

A personal identification number for this employee’s pager.
IQBStringType 10 chars 2.1  

AltPhone

A telephone number given as an alternative to Phone.
IQBStringType 21 chars    

Fax

Fax number.
IQBStringType 21 chars 2.1  

SSN

Social security number. When you add an SSN value to an employee record, it does not have to include dashes; for example, either 123-45-6789 or 123456789 would be valid.
IQBStringType 11 chars 2.0  

Email

E-mail address.
IQBStringType 1023 chars    

AdditionalContactRefList

List of additional contacts.
IQBBaseRefList   12.0  

(List

of IQBBaseRef Objects)
       

ContactName

The name of the contact.
IQBStringType 40 chars   Y

ContactValue

The value of the contact field.
IQBStringType 255 chars   Y

EmergencyContacts

Emergency Contact information for the employee.
IEmergencyContacts   13.0 us.png  

PrimaryContact

Primary emergency contact information for the employee.
IPrimaryContact      

ContactName

The name of the contact.
IQBStringType 40 chars   Y

ContactValue

The value of the contact field.
IQBStringType 255 chars   Y

Relation

Relationship of emergency contact information to the employee.
IQBENRelationType      

SecondaryContact

Secondary emergency contact information for the employee.
ISecondaryContact      

ContactName

The name of the contact.
IQBStringType 40 chars   Y

ContactValue

The value of the contact field.
IQBStringType 255 chars   Y

Relation

Relationship of emergency contact information to the employee.
IQBENRelationType      

EmployeeType

EmployeeType can affect payroll taxes for an employee. A statutory employee is a person who is defined as an employee by statute. Usually an owner or partner will be on the Other Names list, but if they are on the Employee list, their EmployeeType will be Owner.
IQBENEmployeeTypeType      

PartOrFullTime

Full or Part time status of the employee.
IQBENPartOrFullTimeType   13.0 us.png  

Exempt

Exempt or Non-exempt status of the employee.
IQBENExemptType   13.0 us.png  

KeyEmployee

Is employee a key or critical employee.
IQBENKeyEmployeeType   13.0 us.png  

Gender

The gender of this employee.
IQBENGenderType      

HiredDate

An employee’s date of hire.
IQBDateType      

OriginalHireDate

Original hire date the employee was hired.
IQBDateType   13.0 us.png  

AdjustedServiceDate

Adjusted service date for the employee.
IQBDateType   13.0 us.png  

ReleasedDate

The date on which this person’s employment with the company ended.
IQBDateType      

BirthDate

Date of birth.
IQBDateType   2.0  

USCitizen

Is employee a US citizen?
IQBENUSCitizenType   13.0 us.png  

Ethnicity

Ethnicity of employee from AmericianIndian, Asian, Black, Hawaiian, Hispanic, White, TwoOrMoreRaces.
IQBENEthnicityType   13.0 us.png  

Disabled

Is employee disabled?
IQBENDisabledType   13.0 us.png  

DisabilityDesc

Description of employee’s disablitily.
IQBStringType 25 chars 13.0 us.png  

OnFile

Is the employee’s I-9 on file?
IQBENOnFileType   13.0 us.png  

WorkAuthExpireDate

Date the employee’s work authorization expires.
IQBDateType   13.0 us.png  

USVeteran

Is employee a US veteran?
IQBENUSVeteranType   13.0 us.png  

MilitaryStatus

Military status if the employee is a US veteran.
IQBENMilitaryStatusType   13.0 us.png  

AccountNumber

Account numbers appear in the QuickBooks chart of accounts, Account fields, and reports and graphs. If the IsUsingAccountNumber preference is false (that is, if the QuickBooks user has the account numbers Preference turned off), you can still set account numbers through the SDK, but the numbers will not be visible in the user interface.
IQBStringType 99 chars    

Notes

Additional information.
IQBStringType 4095 chars 2.1  

AdditionalNotesRetList

List of notes.
IAdditionalNotesRetList   12.0  

(List

of IAdditionalNotesRet Objects)
       

NoteID

The ID of the note.
IQBIntType     Y

Date

The date the note was updated.
IQBDateType     Y

Note

In a BillAddress or ShipAddress aggregate, the Note field value is written at the bottom of the address in the form in which it appears, such as the invoice form.
IQBStringType 4095 chars   Y

BillingRateRef

Billing rates are used to override the service item rate in a time transaction (TimeTrackingAdd) based on the employee or vendor performing the work. Billing rates are assigned to an employee or a vendor to specify overrides to service items.
IQBBaseRef   6.0  

ListID

Along with FullName, ListID is a way to identify a list object. When a list object is added to QuickBooks through the SDK or through the QuickBooks user interface, the server assigns it a ListID. A ListID is not unique across lists, but it is unique across each particular type of list. For example, two customers could not have the same ListID, and a customer could not have the same ListID as an employee (because Customer and Employee are both name lists). But a customer could have the same ListID as a non-inventory item.
IQBIDType   6.0  

FullName

FullName (along with ListID) is a way to identify a list object. The FullName is the name prefixed by the names of each ancestor, for example Jones:Kitchen:Cabinets. FullName values are not case-sensitive.
IQBStringType 31 chars 6.0  

EmployeePayrollInfo

Pay information for this employee.
IEmployeePayrollInfo   2.0  

PayPeriod

Indicates how often employees are paid. If you include a blank PayPeriod element in an EmployeeMod message, you’ll receive an error. The default value is whatever the QuickBooks user has set in the QuickBooks Employee Preferences.
IQBENPayPeriodType      

ClassRef

Classes can be used to separate transactions into meaningful categories. (For example, transactions could be classified according to department, business location, or type of work.) In QuickBooks, class tracking is off by default. A ClassRef aggregate refers to one of these named classes. For example, in a TimeTracking message, ClassRef refers to the QuickBooks class into which the timed activity falls. If a ClassRef aggregate includes both FullName and ListID, FullName will be ignored. In an InvoiceAdd request, if you specify a ClassRef for the whole invoice, that same ClassRef is automatically used in the line items. If you want to clear that (that is, have NO ClassRef for the line item, you can clear it in the line item by simply not specifying it in the line item.
IQBBaseRef      

ListID

Along with FullName, ListID is a way to identify a list object. When a list object is added to QuickBooks through the SDK or through the QuickBooks user interface, the server assigns it a ListID. A ListID is not unique across lists, but it is unique across each particular type of list. For example, two customers could not have the same ListID, and a customer could not have the same ListID as an employee (because Customer and Employee are both name lists). But a customer could have the same ListID as a non-inventory item.
IQBIDType      

FullName

FullName (along with ListID) is a way to identify a list object. The FullName is the name prefixed by the names of each ancestor, for example Jones:Kitchen:Cabinets. FullName values are not case-sensitive.
IQBStringType 159 chars    

OREarnings

IOREarnings      

ClearEarnings

If ClearEarnings is set to true, the earnings will be deleted for this employee.
IQBBoolType      

EarningsList

A list of IEarnings aggregate objects. If an EmployeeMod request does not include any IEarnings objects, the earnings table for that employee will not change. If EmployeeMod includes at least one IEarnings object, all existing earnings information will be deleted for that employee, and all the earnings information in the -Mod request will be added. (To delete all the earnings information, set the ClearEarnings field to true in an EmployeeMod request.)
IEarningsList      

(List

of IEarnings Objects)
       

PayrollItemWageRef

Each payroll wage item describes and names a payment scheme, for example, Regular Pay or Overtime Pay. A PayrollItemWageRef aggregate refers to one of these wage items. In a request, if a PayrollItemWageRef aggregate includes both FullName and ListID, FullName will be ignored. Within QuickBooks, a timesheet can specify a payroll wage item only if the following criteria are met: The name on the timesheet (which corresponds to the EntityRef in the TimeTracking object) is on the QuickBooks Employee list, and The “Use time data to create paychecks” preference is turned on in the QuickBooks Payroll Info window that provides detailed employee information employee.
IQBBaseRef     Y

ListID

Along with FullName, ListID is a way to identify a list object. When a list object is added to QuickBooks through the SDK or through the QuickBooks user interface, the server assigns it a ListID. A ListID is not unique across lists, but it is unique across each particular type of list. For example, two customers could not have the same ListID, and a customer could not have the same ListID as an employee (because Customer and Employee are both name lists). But a customer could have the same ListID as a non-inventory item.
IQBIDType      

FullName

FullName (along with ListID) is a way to identify a list object. The FullName is the name prefixed by the names of each ancestor, for example Jones:Kitchen:Cabinets. FullName values are not case-sensitive.
IQBStringType 31 chars    

ORRate

IORRate      

Rate

Indicates the price of something.
IQBPriceType      

RatePercent

Indicates the price of something as a percent.
IQBPercentType      

IsUsingTimeDataToCreatePaychecks

Indicates whether or not paychecks are generated from time-tracking data. If you include a blank IsUsingTimeDataToCreatePaychecks element in an EmployeeMod message, you’ll receive an error.
IQBBoolType      

UseTimeDataToCreatePaychecks

Indicates whether time data is used to create paychecks for this employee.
IQBENUseTimeDataToCreatePaychecksType   3.0  

SickHours

Describes how “sick time” is accrued for this employee, along with how many sick hours the employee has accrued.
ISickHours      

HoursAvailable

The total number of hours currently available for the employee to use. If this value is empty, it will default to 0.
IQBTimeIntervalType      

AccrualPeriod

Indicates how an employee accrues time off. If you include a blank AccrualPeriod element in an EmployeeMod message, you’ll receive an error. The default value is whatever the QuickBooks user has set in the QuickBooks Employee Preferences.
IQBENAccrualPeriodType      

HoursAccrued

The number of hours that the employee will accrue per accrual period. The default value is whatever the QuickBooks user has set in the QuickBooks Employee Preferences.
IQBTimeIntervalType      

MaximumHours

The maximum number of hours that the employee can accrue. (QuickBooks itself does not enforce this limit, however. HoursAvailable can be greater than MaximumHours.) The default value is whatever the QuickBooks user has set in the QuickBooks Employee Preferences.
IQBTimeIntervalType      

IsResettingHoursEachNewYear

Indicates whether or not the hours accrued resets to zero at the beginning of the new year. If you include a blank IsResettingHoursEachNewYear element in an EmployeeMod message, you’ll receive an error.
IQBBoolType      

HoursUsed

When used in the SickHours or VacationHours aggregates, refers to the number of sick leave or vacation hours used in the current year.
IQBTimeIntervalType   5.0  

AccrualStartDate

When used in the SickHours or VacationHours aggregates, refers to the date on which sick leave or vacation hours in the current year began to accrue.
IQBDateType   5.0  

VacationHours

Describes how vacation time is accrued for this employee, along with how many vacation hours the employee has accrued.
IVacationHours      

HoursAvailable

The total number of hours currently available for the employee to use. If this value is empty, it will default to 0.
IQBTimeIntervalType      

AccrualPeriod

Indicates how an employee accrues time off. If you include a blank AccrualPeriod element in an EmployeeMod message, you’ll receive an error. The default value is whatever the QuickBooks user has set in the QuickBooks Employee Preferences.
IQBENAccrualPeriodType      

HoursAccrued

The number of hours that the employee will accrue per accrual period. The default value is whatever the QuickBooks user has set in the QuickBooks Employee Preferences.
IQBTimeIntervalType      

MaximumHours

The maximum number of hours that the employee can accrue. (QuickBooks itself does not enforce this limit, however. HoursAvailable can be greater than MaximumHours.) The default value is whatever the QuickBooks user has set in the QuickBooks Employee Preferences.
IQBTimeIntervalType      

IsResettingHoursEachNewYear

Indicates whether or not the hours accrued resets to zero at the beginning of the new year. If you include a blank IsResettingHoursEachNewYear element in an EmployeeMod message, you’ll receive an error.
IQBBoolType      

HoursUsed

When used in the SickHours or VacationHours aggregates, refers to the number of sick leave or vacation hours used in the current year.
IQBTimeIntervalType   5.0  

AccrualStartDate

When used in the SickHours or VacationHours aggregates, refers to the date on which sick leave or vacation hours in the current year began to accrue.
IQBDateType   5.0  

ExternalGUID

Allows for the attachment of a user defined GUID value.
IQBGUIDType   8.0  

DataExtRetList

A list of IDataExtRet objects, each of which represents a field that has been added to QuickBooks as a data extension.
IDataExtRetList   2.0  

(List

of IDataExtRet Objects)
       

OwnerID

OwnerID refers to the owner of a data extension, and must be 0 or a valid GUID. (Custom fields, which are visible in the QuickBooks UI, always have an OwnerID of 0. ) Usually you would keep your application’s GUID confidential to prevent other applications from accessing your data extensions. But if you want to share data extensions with another application, the applications need to use the same GUID. In this case, each application could use two GUIDs, one for shared data extensions and one for confidential data extensions. (An application can have any number of GUIDs.) When you share a data extension with another application, the other application must know both the OwnerID and the DataExtName, as these together form a data extension’s unique name.
IQBGUIDType      

DataExtName

The name of the data extension. If this is a custom field, DataExtName will be visible as a label in the QuickBooks user interface. Also because OwnerID and DataExtName together make the data extension unique, and because custom fields all have the same OwnerID of zero, the DataExtName must be a unique value among existing custom fields. In contrast, the DataExtName for private data extensions must be unique only for the specified OwnerID GUID.
IQBStringType 31 chars   Y

DataExtType

The field’s data type, which corresponds to a qbXML data type. In an IDataExtDefAdd request object, if this is a custom field, DataExtType must be detSTR255TYPE.
IQBENDataExtTypeType     Y

DataExtValue

The data in this field. The maximum length of DataExtValue will depend on the DataExtType of this data extension. For example, if DataExtType is STR255TYPE, the maximum length of DataExtValue is 255 characters. If DataExtType is STR1024TYPE, the maximum size of DataExtValue is 1KB.
IQBStringType     Y

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="16.0"?>
<QBXML>
        <QBXMLMsgsRq onError="stopOnError">
                <EmployeeQueryRq metaData="ENUMTYPE">
                        <!-- BEGIN OR -->
                                <ListID >IDTYPE</ListID> <!-- optional, may repeat -->
                        <!-- OR -->
                                <FullName >STRTYPE</FullName> <!-- optional, may repeat -->
                        <!-- OR -->
                                <MaxReturned >INTTYPE</MaxReturned> <!-- optional -->
                                <!-- ActiveStatus may have one of the following values: ActiveOnly [DEFAULT], InactiveOnly, All -->
                                <ActiveStatus >ENUMTYPE</ActiveStatus> <!-- optional -->
                                <FromModifiedDate >DATETIMETYPE</FromModifiedDate> <!-- optional -->
                                <ToModifiedDate >DATETIMETYPE</ToModifiedDate> <!-- optional -->
                                <!-- BEGIN OR -->
                                        <NameFilter> <!-- optional -->
                                                <!-- MatchCriterion may have one of the following values: StartsWith, Contains, EndsWith -->
                                                <MatchCriterion >ENUMTYPE</MatchCriterion> <!-- required -->
                                                <Name >STRTYPE</Name> <!-- required -->
                                        </NameFilter>
                                <!-- OR -->
                                        <NameRangeFilter> <!-- optional -->
                                                <FromName >STRTYPE</FromName> <!-- optional -->
                                                <ToName >STRTYPE</ToName> <!-- optional -->
                                        </NameRangeFilter>
                                <!-- END OR -->
                        <!-- END OR -->
                        <IncludeRetElement >STRTYPE</IncludeRetElement> <!-- optional, may repeat -->
                        <OwnerID >GUIDTYPE</OwnerID> <!-- optional, may repeat -->
                </EmployeeQueryRq>

                <EmployeeQueryRs statusCode="INTTYPE" statusSeverity="STRTYPE" statusMessage="STRTYPE" retCount="INTTYPE">
                        <EmployeeRet> <!-- optional, may repeat -->
                                <ListID >IDTYPE</ListID> <!-- required -->
                                <TimeCreated >DATETIMETYPE</TimeCreated> <!-- required -->
                                <TimeModified >DATETIMETYPE</TimeModified> <!-- required -->
                                <EditSequence >STRTYPE</EditSequence> <!-- required -->
                                <Name >STRTYPE</Name> <!-- required -->
                                <IsActive >BOOLTYPE</IsActive> <!-- optional -->
                                <Salutation >STRTYPE</Salutation> <!-- optional -->
                                <FirstName >STRTYPE</FirstName> <!-- optional -->
                                <MiddleName >STRTYPE</MiddleName> <!-- optional -->
                                <LastName >STRTYPE</LastName> <!-- optional -->
                                <JobTitle >STRTYPE</JobTitle> <!-- optional -->
                                <SupervisorRef> <!-- optional -->
                                        <ListID >IDTYPE</ListID> <!-- optional -->
                                        <FullName >STRTYPE</FullName> <!-- optional -->
                                </SupervisorRef>
                                <Department >STRTYPE</Department> <!-- optional -->
                                <Description >STRTYPE</Description> <!-- optional -->
                                <TargetBonus >AMTTYPE</TargetBonus> <!-- optional -->
                                <EmployeeAddress> <!-- optional -->
                                        <Addr1 >STRTYPE</Addr1> <!-- optional -->
                                        <Addr2 >STRTYPE</Addr2> <!-- optional -->
                                        <City >STRTYPE</City> <!-- optional -->
                                        <State >STRTYPE</State> <!-- optional -->
                                        <PostalCode >STRTYPE</PostalCode> <!-- optional -->
                                </EmployeeAddress>
                                <PrintAs >STRTYPE</PrintAs> <!-- optional -->
                                <Phone >STRTYPE</Phone> <!-- optional -->
                                <Mobile >STRTYPE</Mobile> <!-- optional -->
                                <Pager >STRTYPE</Pager> <!-- optional -->
                                <PagerPIN >STRTYPE</PagerPIN> <!-- optional -->
                                <AltPhone >STRTYPE</AltPhone> <!-- optional -->
                                <Fax >STRTYPE</Fax> <!-- optional -->
                                <SSN >STRTYPE</SSN> <!-- optional -->
                                <Email >STRTYPE</Email> <!-- optional -->
                                <AdditionalContactRef> <!-- must occur 0 - 8 times -->
                                        <ContactName >STRTYPE</ContactName> <!-- required -->
                                        <ContactValue >STRTYPE</ContactValue> <!-- required -->
                                </AdditionalContactRef>
                                <EmergencyContacts> <!-- optional -->
                                        <PrimaryContact> <!-- optional -->
                                                <ContactName >STRTYPE</ContactName> <!-- required -->
                                                <ContactValue >STRTYPE</ContactValue> <!-- required -->
                                                <!-- Relation may have one of the following values: Spouse, Partner, Mother, Father, Sister, Brother, Son, Daughter, Friend, Other -->
                                                <Relation >ENUMTYPE</Relation> <!-- optional -->
                                        </PrimaryContact>
                                        <SecondaryContact> <!-- optional -->
                                                <ContactName >STRTYPE</ContactName> <!-- required -->
                                                <ContactValue >STRTYPE</ContactValue> <!-- required -->
                                                <!-- Relation may have one of the following values: Spouse, Partner, Mother, Father, Sister, Brother, Son, Daughter, Friend, Other -->
                                                <Relation >ENUMTYPE</Relation> <!-- optional -->
                                        </SecondaryContact>
                                </EmergencyContacts>
                                <!-- EmployeeType may have one of the following values: Officer, Owner, Regular [DEFAULT], Statutory -->
                                <EmployeeType >ENUMTYPE</EmployeeType> <!-- optional -->
                                <!-- PartOrFullTime may have one of the following values: PartTime, FullTime -->
                                <PartOrFullTime >ENUMTYPE</PartOrFullTime> <!-- optional -->
                                <!-- Exempt may have one of the following values: Exempt, NonExempt -->
                                <Exempt >ENUMTYPE</Exempt> <!-- optional -->
                                <!-- KeyEmployee may have one of the following values: Yes, No -->
                                <KeyEmployee >ENUMTYPE</KeyEmployee> <!-- optional -->
                                <!-- Gender may have one of the following values: Male, Female -->
                                <Gender >ENUMTYPE</Gender> <!-- optional -->
                                <HiredDate >DATETYPE</HiredDate> <!-- optional -->
                                <OriginalHireDate >DATETYPE</OriginalHireDate> <!-- optional -->
                                <AdjustedServiceDate >DATETYPE</AdjustedServiceDate> <!-- optional -->
                                <ReleasedDate >DATETYPE</ReleasedDate> <!-- optional -->
                                <BirthDate >DATETYPE</BirthDate> <!-- optional -->
                                <!-- USCitizen may have one of the following values: Yes, No -->
                                <USCitizen >ENUMTYPE</USCitizen> <!-- optional -->
                                <!-- Ethnicity may have one of the following values: AmericianIndian, Asian, Black, Hawaiian, Hispanic, White, TwoOrMoreRaces -->
                                <Ethnicity >ENUMTYPE</Ethnicity> <!-- optional -->
                                <!-- Disabled may have one of the following values: Yes, No -->
                                <Disabled >ENUMTYPE</Disabled> <!-- optional -->
                                <DisabilityDesc >STRTYPE</DisabilityDesc> <!-- optional -->
                                <!-- OnFile may have one of the following values: Yes, No -->
                                <OnFile >ENUMTYPE</OnFile> <!-- optional -->
                                <WorkAuthExpireDate >DATETYPE</WorkAuthExpireDate> <!-- optional -->
                                <!-- USVeteran may have one of the following values: Yes, No -->
                                <USVeteran >ENUMTYPE</USVeteran> <!-- optional -->
                                <!-- MilitaryStatus may have one of the following values: Active, Reserve -->
                                <MilitaryStatus >ENUMTYPE</MilitaryStatus> <!-- optional -->
                                <AccountNumber >STRTYPE</AccountNumber> <!-- optional -->
                                <Notes >STRTYPE</Notes> <!-- optional -->
                                <AdditionalNotesRet> <!-- optional, may repeat -->
                                        <NoteID >INTTYPE</NoteID> <!-- required -->
                                        <Date >DATETYPE</Date> <!-- required -->
                                        <Note >STRTYPE</Note> <!-- required -->
                                </AdditionalNotesRet>
                                <BillingRateRef> <!-- optional -->
                                        <ListID >IDTYPE</ListID> <!-- optional -->
                                        <FullName >STRTYPE</FullName> <!-- optional -->
                                </BillingRateRef>
                                <EmployeePayrollInfo> <!-- optional -->
                                        <!-- PayPeriod may have one of the following values: Daily, Weekly, Biweekly, Semimonthly, Monthly, Quarterly, Yearly -->
                                        <PayPeriod >ENUMTYPE</PayPeriod> <!-- optional -->
                                        <ClassRef> <!-- optional -->
                                                <ListID >IDTYPE</ListID> <!-- optional -->
                                                <FullName >STRTYPE</FullName> <!-- optional -->
                                        </ClassRef>
                                        <!-- BEGIN OR -->
                                                <ClearEarnings >BOOLTYPE</ClearEarnings> <!-- optional -->
                                        <!-- OR -->
                                                <Earnings> <!-- optional, may repeat -->
                                                        <PayrollItemWageRef> <!-- required -->
                                                                <ListID >IDTYPE</ListID> <!-- optional -->
                                                                <FullName >STRTYPE</FullName> <!-- optional -->
                                                        </PayrollItemWageRef>
                                                        <!-- BEGIN OR -->
                                                                <Rate >PRICETYPE</Rate> <!-- optional -->
                                                        <!-- OR -->
                                                                <RatePercent >PERCENTTYPE</RatePercent> <!-- optional -->
                                                        <!-- END OR -->
                                                </Earnings>
                                        <!-- END OR -->
                                        <IsUsingTimeDataToCreatePaychecks >BOOLTYPE</IsUsingTimeDataToCreatePaychecks> <!-- optional -->
                                        <!-- UseTimeDataToCreatePaychecks may have one of the following values: NotSet, UseTimeData, DoNotUseTimeData -->
                                        <UseTimeDataToCreatePaychecks >ENUMTYPE</UseTimeDataToCreatePaychecks> <!-- optional -->
                                        <SickHours> <!-- optional -->
                                                <HoursAvailable >TIMEINTERVALTYPE</HoursAvailable> <!-- optional -->
                                                <!-- AccrualPeriod may have one of the following values: BeginningOfYear, EveryHourOnPaycheck, EveryPaycheck -->
                                                <AccrualPeriod >ENUMTYPE</AccrualPeriod> <!-- optional -->
                                                <HoursAccrued >TIMEINTERVALTYPE</HoursAccrued> <!-- optional -->
                                                <MaximumHours >TIMEINTERVALTYPE</MaximumHours> <!-- optional -->
                                                <IsResettingHoursEachNewYear >BOOLTYPE</IsResettingHoursEachNewYear> <!-- optional -->
                                                <HoursUsed >TIMEINTERVALTYPE</HoursUsed> <!-- optional -->
                                                <AccrualStartDate >DATETYPE</AccrualStartDate> <!-- optional -->
                                        </SickHours>
                                        <VacationHours> <!-- optional -->
                                                <HoursAvailable >TIMEINTERVALTYPE</HoursAvailable> <!-- optional -->
                                                <!-- AccrualPeriod may have one of the following values: BeginningOfYear, EveryHourOnPaycheck, EveryPaycheck -->
                                                <AccrualPeriod >ENUMTYPE</AccrualPeriod> <!-- optional -->
                                                <HoursAccrued >TIMEINTERVALTYPE</HoursAccrued> <!-- optional -->
                                                <MaximumHours >TIMEINTERVALTYPE</MaximumHours> <!-- optional -->
                                                <IsResettingHoursEachNewYear >BOOLTYPE</IsResettingHoursEachNewYear> <!-- optional -->
                                                <HoursUsed >TIMEINTERVALTYPE</HoursUsed> <!-- optional -->
                                                <AccrualStartDate >DATETYPE</AccrualStartDate> <!-- optional -->
                                        </VacationHours>
                                </EmployeePayrollInfo>
                                <ExternalGUID >GUIDTYPE</ExternalGUID> <!-- optional -->
                                <DataExtRet> <!-- optional, may repeat -->
                                        <OwnerID >GUIDTYPE</OwnerID> <!-- optional -->
                                        <DataExtName >STRTYPE</DataExtName> <!-- required -->
                                        <!-- DataExtType may have one of the following values: AMTTYPE, DATETIMETYPE, INTTYPE, PERCENTTYPE, PRICETYPE, QUANTYPE, STR1024TYPE, STR255TYPE -->
                                        <DataExtType >ENUMTYPE</DataExtType> <!-- required -->
                                        <DataExtValue >STRTYPE</DataExtValue> <!-- required -->
                                </DataExtRet>
                        </EmployeeRet>
                </EmployeeQueryRs>
        </QBXMLMsgsRq>
</QBXML>

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
'The following sample code is generated as an illustration of
'Creating requests and parsing responses ONLY
'This code is NOT intended to show best practices or ideal code
'Use at your most careful discretion

imports System
imports System.Net
imports System.Drawing
imports System.Collections
imports System.ComponentModel
imports System.Windows.Forms
imports System.Data
imports System.IO
imports Interop.QBFC16

Module com.intuit.idn.samples
        Public Class Sample
                Public Sub  DoEmployeeQuery()
                        Dim sessionBegun as Boolean
                        sessionBegun = False
                        Dim connectionOpen as Boolean
                        connectionOpen = False
                        Dim sessionManager as QBSessionManager
                        sessionManager = nothing

                        Try
                                'Create the session Manager object
                                sessionManager = new QBSessionManager

                                'Create the message set request object to hold our request
                                Dim requestMsgSet as IMsgSetRequest
                                requestMsgSet = sessionManager.CreateMsgSetRequest("US",16,0)
                                requestMsgSet.Attributes.OnError = ENRqOnError.roeContinue

                                BuildEmployeeQueryRq(requestMsgSet)

                                'Connect to QuickBooks and begin a session
                                sessionManager.OpenConnection("","Sample Code from OSR")
                                connectionOpen = True
                                sessionManager.BeginSession("", ENOpenMode.omDontCare)
                                sessionBegun = True

                                'Send the request and get the response from QuickBooks
                                Dim responseMsgSet as IMsgSetResponse
                                responseMsgSet = sessionManager.DoRequests(requestMsgSet)

                                'End the session and close the connection to QuickBooks
                                sessionManager.EndSession()
                                sessionBegun = False
                                sessionManager.CloseConnection()
                                connectionOpen = False

                                WalkEmployeeQueryRs(responseMsgSet)
                        Catch e as Exception
                                MessageBox.Show(e.Message, "Error")
                                if (sessionBegun) then
                                        sessionManager.EndSession()
                                End If
                                if (connectionOpen) then
                                        sessionManager.CloseConnection()
                                End If
                        End Try
                End Sub
                Public Sub BuildEmployeeQueryRq(requestMsgSet as IMsgSetRequest)
                        Dim EmployeeQueryRq as IEmployeeQuery
                        EmployeeQueryRq= requestMsgSet.AppendEmployeeQueryRq()
                        Dim ORListQueryElementType8729 as String
                        ORListQueryElementType8729 = "ListIDList"
                        if (ORListQueryElementType8729 == "ListIDList") then
                                'Set field value for ListIDList
                                'May create more than one of these if needed
                                EmployeeQueryRq.ORListQuery.ListIDList.Add("200000-1011023419")
                        End If
                        if (ORListQueryElementType8729 == "FullNameList") then
                                'Set field value for FullNameList
                                'May create more than one of these if needed
                                EmployeeQueryRq.ORListQuery.FullNameList.Add("ab")
                        End If
                        if (ORListQueryElementType8729 == "ListFilter") then
                                'Set field value for MaxReturned
                                EmployeeQueryRq.ORListQuery.ListFilter.MaxReturned.SetValue(6)
                                'Set field value for ActiveStatus
                                EmployeeQueryRq.ORListQuery.ListFilter.ActiveStatus.SetValue(ENActiveStatus.asActiveOnly [DEFAULT])
                                'Set field value for FromModifiedDate
                                EmployeeQueryRq.ORListQuery.ListFilter.FromModifiedDate.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
                                'Set field value for ToModifiedDate
                                EmployeeQueryRq.ORListQuery.ListFilter.ToModifiedDate.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
                                Dim ORNameFilterElementType8730 as String
                                ORNameFilterElementType8730 = "NameFilter"
                                if (ORNameFilterElementType8730 == "NameFilter") then
                                        'Set field value for MatchCriterion
                                        EmployeeQueryRq.ORListQuery.ListFilter.ORNameFilter.NameFilter.MatchCriterion.SetValue(ENMatchCriterion.mcStartsWith)
                                        'Set field value for Name
                                        EmployeeQueryRq.ORListQuery.ListFilter.ORNameFilter.NameFilter.Name.SetValue("ab")
                                End If
                                if (ORNameFilterElementType8730 == "NameRangeFilter") then
                                        'Set field value for FromName
                                        EmployeeQueryRq.ORListQuery.ListFilter.ORNameFilter.NameRangeFilter.FromName.SetValue("ab")
                                        'Set field value for ToName
                                        EmployeeQueryRq.ORListQuery.ListFilter.ORNameFilter.NameRangeFilter.ToName.SetValue("ab")
                                End If
                        End If
                        'Set field value for IncludeRetElementList
                        'May create more than one of these if needed
                        EmployeeQueryRq.IncludeRetElementList.Add("ab")
                        'Set field value for OwnerIDList
                        'May create more than one of these if needed
                        EmployeeQueryRq.OwnerIDList.Add(System.Guid.NewGuid().ToString())
                End Sub




                Public Sub WalkEmployeeQueryRs( responseMsgSet as IMsgSetResponse)
                        if (responseMsgSet is nothing) then
                                Exit Sub
                        End If

                        Dim responseList as IResponseList
                        responseList = responseMsgSet.ResponseList
                        if (responseList is nothing) then
                                Exit Sub
                        End If

                        'if we sent only one request, there is only one response, we'll walk the list for this sample
                        for j=0 to responseList.Count-1
                                Dim response as IResponse
                                response = responseList.GetAt(j)
                                'check the status code of the response, 0=ok, >0 is warning
                                if (response.StatusCode >= 0) then
                                        'the request-specific response is in the details, make sure we have some
                                        if (not response.Detail is nothing) then
                                                'make sure the response is the type we're expecting
                                                Dim responseType as ENResponseType
                                                responseType = CType(response.Type.GetValue(),ENResponseType)
                                                if (responseType == ENResponseType.rtEmployeeQueryRs) then
                                                        'upcast to more specific type here, this is safe because we checked with response.Type check above
                                                        Dim EmployeeRet as IEmployeeRetList
                                                        EmployeeRet = CType(response.Detail,IEmployeeRetList)
                                                        WalkEmployeeRet(EmployeeRet)
                                                End If
                                        End If
                                End If
                        Next j
                End Sub




                Public Sub WalkEmployeeRet(EmployeeRet as IEmployeeRetList)
                        if (EmployeeRet is nothing) then
                                Exit Sub
                        End If

                        'Go through all the elements of IEmployeeRetList
                        'Get value of ListID
                        Dim ListID8731 as String
                        ListID8731 = EmployeeRet.ListID.GetValue()
                        'Get value of TimeCreated
                        Dim TimeCreated8732 as DateTime
                        TimeCreated8732 = EmployeeRet.TimeCreated.GetValue()
                        'Get value of TimeModified
                        Dim TimeModified8733 as DateTime
                        TimeModified8733 = EmployeeRet.TimeModified.GetValue()
                        'Get value of EditSequence
                        Dim EditSequence8734 as String
                        EditSequence8734 = EmployeeRet.EditSequence.GetValue()
                        'Get value of Name
                        Dim Name8735 as String
                        Name8735 = EmployeeRet.Name.GetValue()
                        'Get value of IsActive
                        if ( not EmployeeRet.IsActive is nothing) then
                                Dim IsActive8736 as Boolean
                                IsActive8736 = EmployeeRet.IsActive.GetValue()
                        End If
                        'Get value of Salutation
                        if ( not EmployeeRet.Salutation is nothing) then
                                Dim Salutation8737 as String
                                Salutation8737 = EmployeeRet.Salutation.GetValue()
                        End If
                        'Get value of FirstName
                        if ( not EmployeeRet.FirstName is nothing) then
                                Dim FirstName8738 as String
                                FirstName8738 = EmployeeRet.FirstName.GetValue()
                        End If
                        'Get value of MiddleName
                        if ( not EmployeeRet.MiddleName is nothing) then
                                Dim MiddleName8739 as String
                                MiddleName8739 = EmployeeRet.MiddleName.GetValue()
                        End If
                        'Get value of LastName
                        if ( not EmployeeRet.LastName is nothing) then
                                Dim LastName8740 as String
                                LastName8740 = EmployeeRet.LastName.GetValue()
                        End If
                        'Get value of JobTitle
                        if ( not EmployeeRet.JobTitle is nothing) then
                                Dim JobTitle8741 as String
                                JobTitle8741 = EmployeeRet.JobTitle.GetValue()
                        End If
                        if (not EmployeeRet.SupervisorRef. is nothing) then
                                'Get value of ListID
                                if ( not EmployeeRet.SupervisorRef.ListID is nothing) then
                                        Dim ListID8742 as String
                                        ListID8742 = EmployeeRet.SupervisorRef.ListID.GetValue()
                                End If
                                'Get value of FullName
                                if ( not EmployeeRet.SupervisorRef.FullName is nothing) then
                                        Dim FullName8743 as String
                                        FullName8743 = EmployeeRet.SupervisorRef.FullName.GetValue()
                                End If
                        End If
                        'Get value of Department
                        if ( not EmployeeRet.Department is nothing) then
                                Dim Department8744 as String
                                Department8744 = EmployeeRet.Department.GetValue()
                        End If
                        'Get value of Description
                        if ( not EmployeeRet.Description is nothing) then
                                Dim Description8745 as String
                                Description8745 = EmployeeRet.Description.GetValue()
                        End If
                        'Get value of TargetBonus
                        if ( not EmployeeRet.TargetBonus is nothing) then
                                Dim TargetBonus8746 as Double
                                TargetBonus8746 = EmployeeRet.TargetBonus.GetValue()
                        End If
                        if (not EmployeeRet.EmployeeAddress. is nothing) then
                                'Get value of Addr1
                                if ( not EmployeeRet.EmployeeAddress.Addr1 is nothing) then
                                        Dim Addr18747 as String
                                        Addr18747 = EmployeeRet.EmployeeAddress.Addr1.GetValue()
                                End If
                                'Get value of Addr2
                                if ( not EmployeeRet.EmployeeAddress.Addr2 is nothing) then
                                        Dim Addr28748 as String
                                        Addr28748 = EmployeeRet.EmployeeAddress.Addr2.GetValue()
                                End If
                                'Get value of City
                                if ( not EmployeeRet.EmployeeAddress.City is nothing) then
                                        Dim City8749 as String
                                        City8749 = EmployeeRet.EmployeeAddress.City.GetValue()
                                End If
                                'Get value of State
                                if ( not EmployeeRet.EmployeeAddress.State is nothing) then
                                        Dim State8750 as String
                                        State8750 = EmployeeRet.EmployeeAddress.State.GetValue()
                                End If
                                'Get value of PostalCode
                                if ( not EmployeeRet.EmployeeAddress.PostalCode is nothing) then
                                        Dim PostalCode8751 as String
                                        PostalCode8751 = EmployeeRet.EmployeeAddress.PostalCode.GetValue()
                                End If
                        End If
                        'Get value of PrintAs
                        if ( not EmployeeRet.PrintAs is nothing) then
                                Dim PrintAs8752 as String
                                PrintAs8752 = EmployeeRet.PrintAs.GetValue()
                        End If
                        'Get value of Phone
                        if ( not EmployeeRet.Phone is nothing) then
                                Dim Phone8753 as String
                                Phone8753 = EmployeeRet.Phone.GetValue()
                        End If
                        'Get value of Mobile
                        if ( not EmployeeRet.Mobile is nothing) then
                                Dim Mobile8754 as String
                                Mobile8754 = EmployeeRet.Mobile.GetValue()
                        End If
                        'Get value of Pager
                        if ( not EmployeeRet.Pager is nothing) then
                                Dim Pager8755 as String
                                Pager8755 = EmployeeRet.Pager.GetValue()
                        End If
                        'Get value of PagerPIN
                        if ( not EmployeeRet.PagerPIN is nothing) then
                                Dim PagerPIN8756 as String
                                PagerPIN8756 = EmployeeRet.PagerPIN.GetValue()
                        End If
                        'Get value of AltPhone
                        if ( not EmployeeRet.AltPhone is nothing) then
                                Dim AltPhone8757 as String
                                AltPhone8757 = EmployeeRet.AltPhone.GetValue()
                        End If
                        'Get value of Fax
                        if ( not EmployeeRet.Fax is nothing) then
                                Dim Fax8758 as String
                                Fax8758 = EmployeeRet.Fax.GetValue()
                        End If
                        'Get value of SSN
                        if ( not EmployeeRet.SSN is nothing) then
                                Dim SSN8759 as String
                                SSN8759 = EmployeeRet.SSN.GetValue()
                        End If
                        'Get value of Email
                        if ( not EmployeeRet.Email is nothing) then
                                Dim Email8760 as String
                                Email8760 = EmployeeRet.Email.GetValue()
                        End If
                        if (not EmployeeRet.AdditionalContactRefList is nothing)
                                Dim i8761 as Integer
                                for i8761 = 0  to EmployeeRet.AdditionalContactRefList.Count - 1
                                        Dim QBBaseRef as IQBBaseRef
                                        QBBaseRef = EmployeeRet.AdditionalContactRefList.GetAt(i8761)
                                        'Get value of ContactName
                                        Dim ContactName8762 as String
                                        ContactName8762 = QBBaseRefContactName.GetValue()
                                        'Get value of ContactValue
                                        Dim ContactValue8763 as String
                                        ContactValue8763 = QBBaseRefContactValue.GetValue()
                                Next i8761
                        End If
                        if (not EmployeeRet.EmergencyContacts. is nothing) then
                                if (not EmployeeRet.EmergencyContacts.PrimaryContact. is nothing) then
                                        'Get value of ContactName
                                        Dim ContactName8764 as String
                                        ContactName8764 = EmployeeRet.EmergencyContacts.PrimaryContact.ContactName.GetValue()
                                        'Get value of ContactValue
                                        Dim ContactValue8765 as String
                                        ContactValue8765 = EmployeeRet.EmergencyContacts.PrimaryContact.ContactValue.GetValue()
                                        'Get value of Relation
                                        if ( not EmployeeRet.EmergencyContacts.PrimaryContact.Relation is nothing) then
                                                Dim Relation8766 as ENRelation
                                                Relation8766 = EmployeeRet.EmergencyContacts.PrimaryContact.Relation.GetValue()
                                        End If
                                End If
                                if (not EmployeeRet.EmergencyContacts.SecondaryContact. is nothing) then
                                        'Get value of ContactName
                                        Dim ContactName8767 as String
                                        ContactName8767 = EmployeeRet.EmergencyContacts.SecondaryContact.ContactName.GetValue()
                                        'Get value of ContactValue
                                        Dim ContactValue8768 as String
                                        ContactValue8768 = EmployeeRet.EmergencyContacts.SecondaryContact.ContactValue.GetValue()
                                        'Get value of Relation
                                        if ( not EmployeeRet.EmergencyContacts.SecondaryContact.Relation is nothing) then
                                                Dim Relation8769 as ENRelation
                                                Relation8769 = EmployeeRet.EmergencyContacts.SecondaryContact.Relation.GetValue()
                                        End If
                                End If
                        End If
                        'Get value of EmployeeType
                        if ( not EmployeeRet.EmployeeType is nothing) then
                                Dim EmployeeType8770 as ENEmployeeType
                                EmployeeType8770 = EmployeeRet.EmployeeType.GetValue()
                        End If
                        'Get value of PartOrFullTime
                        if ( not EmployeeRet.PartOrFullTime is nothing) then
                                Dim PartOrFullTime8771 as ENPartOrFullTime
                                PartOrFullTime8771 = EmployeeRet.PartOrFullTime.GetValue()
                        End If
                        'Get value of Exempt
                        if ( not EmployeeRet.Exempt is nothing) then
                                Dim Exempt8772 as ENExempt
                                Exempt8772 = EmployeeRet.Exempt.GetValue()
                        End If
                        'Get value of KeyEmployee
                        if ( not EmployeeRet.KeyEmployee is nothing) then
                                Dim KeyEmployee8773 as ENKeyEmployee
                                KeyEmployee8773 = EmployeeRet.KeyEmployee.GetValue()
                        End If
                        'Get value of Gender
                        if ( not EmployeeRet.Gender is nothing) then
                                Dim Gender8774 as ENGender
                                Gender8774 = EmployeeRet.Gender.GetValue()
                        End If
                        'Get value of HiredDate
                        if ( not EmployeeRet.HiredDate is nothing) then
                                Dim HiredDate8775 as DateTime
                                HiredDate8775 = EmployeeRet.HiredDate.GetValue()
                        End If
                        'Get value of OriginalHireDate
                        if ( not EmployeeRet.OriginalHireDate is nothing) then
                                Dim OriginalHireDate8776 as DateTime
                                OriginalHireDate8776 = EmployeeRet.OriginalHireDate.GetValue()
                        End If
                        'Get value of AdjustedServiceDate
                        if ( not EmployeeRet.AdjustedServiceDate is nothing) then
                                Dim AdjustedServiceDate8777 as DateTime
                                AdjustedServiceDate8777 = EmployeeRet.AdjustedServiceDate.GetValue()
                        End If
                        'Get value of ReleasedDate
                        if ( not EmployeeRet.ReleasedDate is nothing) then
                                Dim ReleasedDate8778 as DateTime
                                ReleasedDate8778 = EmployeeRet.ReleasedDate.GetValue()
                        End If
                        'Get value of BirthDate
                        if ( not EmployeeRet.BirthDate is nothing) then
                                Dim BirthDate8779 as DateTime
                                BirthDate8779 = EmployeeRet.BirthDate.GetValue()
                        End If
                        'Get value of USCitizen
                        if ( not EmployeeRet.USCitizen is nothing) then
                                Dim USCitizen8780 as ENUSCitizen
                                USCitizen8780 = EmployeeRet.USCitizen.GetValue()
                        End If
                        'Get value of Ethnicity
                        if ( not EmployeeRet.Ethnicity is nothing) then
                                Dim Ethnicity8781 as ENEthnicity
                                Ethnicity8781 = EmployeeRet.Ethnicity.GetValue()
                        End If
                        'Get value of Disabled
                        if ( not EmployeeRet.Disabled is nothing) then
                                Dim Disabled8782 as ENDisabled
                                Disabled8782 = EmployeeRet.Disabled.GetValue()
                        End If
                        'Get value of DisabilityDesc
                        if ( not EmployeeRet.DisabilityDesc is nothing) then
                                Dim DisabilityDesc8783 as String
                                DisabilityDesc8783 = EmployeeRet.DisabilityDesc.GetValue()
                        End If
                        'Get value of OnFile
                        if ( not EmployeeRet.OnFile is nothing) then
                                Dim OnFile8784 as ENOnFile
                                OnFile8784 = EmployeeRet.OnFile.GetValue()
                        End If
                        'Get value of WorkAuthExpireDate
                        if ( not EmployeeRet.WorkAuthExpireDate is nothing) then
                                Dim WorkAuthExpireDate8785 as DateTime
                                WorkAuthExpireDate8785 = EmployeeRet.WorkAuthExpireDate.GetValue()
                        End If
                        'Get value of USVeteran
                        if ( not EmployeeRet.USVeteran is nothing) then
                                Dim USVeteran8786 as ENUSVeteran
                                USVeteran8786 = EmployeeRet.USVeteran.GetValue()
                        End If
                        'Get value of MilitaryStatus
                        if ( not EmployeeRet.MilitaryStatus is nothing) then
                                Dim MilitaryStatus8787 as ENMilitaryStatus
                                MilitaryStatus8787 = EmployeeRet.MilitaryStatus.GetValue()
                        End If
                        'Get value of AccountNumber
                        if ( not EmployeeRet.AccountNumber is nothing) then
                                Dim AccountNumber8788 as String
                                AccountNumber8788 = EmployeeRet.AccountNumber.GetValue()
                        End If
                        'Get value of Notes
                        if ( not EmployeeRet.Notes is nothing) then
                                Dim Notes8789 as String
                                Notes8789 = EmployeeRet.Notes.GetValue()
                        End If
                        if (not EmployeeRet.AdditionalNotesRetList is nothing)
                                Dim i8790 as Integer
                                for i8790 = 0  to EmployeeRet.AdditionalNotesRetList.Count - 1
                                        Dim AdditionalNotesRet as IAdditionalNotesRet
                                        AdditionalNotesRet = EmployeeRet.AdditionalNotesRetList.GetAt(i8790)
                                        'Get value of NoteID
                                        Dim NoteID8791 as Integer
                                        NoteID8791 = AdditionalNotesRetNoteID.GetValue()
                                        'Get value of Date
                                        Dim Date8792 as DateTime
                                        Date8792 = AdditionalNotesRetDate.GetValue()
                                        'Get value of Note
                                        Dim Note8793 as String
                                        Note8793 = AdditionalNotesRetNote.GetValue()
                                Next i8790
                        End If
                        if (not EmployeeRet.BillingRateRef. is nothing) then
                                'Get value of ListID
                                if ( not EmployeeRet.BillingRateRef.ListID is nothing) then
                                        Dim ListID8794 as String
                                        ListID8794 = EmployeeRet.BillingRateRef.ListID.GetValue()
                                End If
                                'Get value of FullName
                                if ( not EmployeeRet.BillingRateRef.FullName is nothing) then
                                        Dim FullName8795 as String
                                        FullName8795 = EmployeeRet.BillingRateRef.FullName.GetValue()
                                End If
                        End If
                        if (not EmployeeRet.EmployeePayrollInfo. is nothing) then
                                'Get value of PayPeriod
                                if ( not EmployeeRet.EmployeePayrollInfo.PayPeriod is nothing) then
                                        Dim PayPeriod8796 as ENPayPeriod
                                        PayPeriod8796 = EmployeeRet.EmployeePayrollInfo.PayPeriod.GetValue()
                                End If
                                if (not EmployeeRet.EmployeePayrollInfo.ClassRef. is nothing) then
                                        'Get value of ListID
                                        if ( not EmployeeRet.EmployeePayrollInfo.ClassRef.ListID is nothing) then
                                                Dim ListID8797 as String
                                                ListID8797 = EmployeeRet.EmployeePayrollInfo.ClassRef.ListID.GetValue()
                                        End If
                                        'Get value of FullName
                                        if ( not EmployeeRet.EmployeePayrollInfo.ClassRef.FullName is nothing) then
                                                Dim FullName8798 as String
                                                FullName8798 = EmployeeRet.EmployeePayrollInfo.ClassRef.FullName.GetValue()
                                        End If
                                End If
                                if (not EmployeeRet.EmployeePayrollInfo.OREarnings is nothing) then
                                        if (not EmployeeRet.EmployeePayrollInfo.OREarnings.ClearEarnings is nothing) then
                                                'Get value of ClearEarnings
                                                if ( not EmployeeRet.EmployeePayrollInfo.OREarnings.ClearEarnings is nothing) then
                                                        Dim ClearEarnings8800 as Boolean
                                                        ClearEarnings8800 = EmployeeRet.EmployeePayrollInfo.OREarnings.ClearEarnings.GetValue()
                                                End If
                                        End If
                                        if (not EmployeeRet.EmployeePayrollInfo.OREarnings.EarningsList is nothing) then
                                                if (not EmployeeRet.EmployeePayrollInfo.OREarnings.EarningsList is nothing)
                                                        Dim i8801 as Integer
                                                        for i8801 = 0  to EmployeeRet.EmployeePayrollInfo.OREarnings.EarningsList.Count - 1
                                                                Dim Earnings as IEarnings
                                                                Earnings = EmployeeRet.EmployeePayrollInfo.OREarnings.EarningsList.GetAt(i8801)
                                                                'Get value of ListID
                                                                if ( not EarningsPayrollItemWageRef.ListID is nothing) then
                                                                        Dim ListID8802 as String
                                                                        ListID8802 = EarningsPayrollItemWageRef.ListID.GetValue()
                                                                End If
                                                                'Get value of FullName
                                                                if ( not EarningsPayrollItemWageRef.FullName is nothing) then
                                                                        Dim FullName8803 as String
                                                                        FullName8803 = EarningsPayrollItemWageRef.FullName.GetValue()
                                                                End If
                                                                if (not EarningsORRate is nothing) then
                                                                        if (not EarningsORRate.Rate is nothing) then
                                                                                'Get value of Rate
                                                                                if ( not EarningsORRate.Rate is nothing) then
                                                                                Dim Rate8805 as Double
                                                                                Rate8805 = EarningsORRate.Rate.GetValue()
                                                                                End If
                                                                        End If
                                                                        if (not EarningsORRate.RatePercent is nothing) then
                                                                                'Get value of RatePercent
                                                                                if ( not EarningsORRate.RatePercent is nothing) then
                                                                                Dim RatePercent8806 as Double
                                                                                RatePercent8806 = EarningsORRate.RatePercent.GetValue()
                                                                                End If
                                                                        End If
                                                                End If
                                                        Next i8801
                                                End If
                                        End If
                                End If
                                'Get value of IsUsingTimeDataToCreatePaychecks
                                if ( not EmployeeRet.EmployeePayrollInfo.IsUsingTimeDataToCreatePaychecks is nothing) then
                                        Dim IsUsingTimeDataToCreatePaychecks8807 as Boolean
                                        IsUsingTimeDataToCreatePaychecks8807 = EmployeeRet.EmployeePayrollInfo.IsUsingTimeDataToCreatePaychecks.GetValue()
                                End If
                                'Get value of UseTimeDataToCreatePaychecks
                                if ( not EmployeeRet.EmployeePayrollInfo.UseTimeDataToCreatePaychecks is nothing) then
                                        Dim UseTimeDataToCreatePaychecks8808 as ENUseTimeDataToCreatePaychecks
                                        UseTimeDataToCreatePaychecks8808 = EmployeeRet.EmployeePayrollInfo.UseTimeDataToCreatePaychecks.GetValue()
                                End If
                                if (not EmployeeRet.EmployeePayrollInfo.SickHours. is nothing) then
                                        'Get value of HoursAvailable
                                        if ( not EmployeeRet.EmployeePayrollInfo.SickHours.HoursAvailable is nothing) then
                                                Dim HoursAvailable8809 as IQBTimeIntervalType
                                                HoursAvailable8809 = EmployeeRet.EmployeePayrollInfo.SickHours.HoursAvailable.GetValue()
                                        End If
                                        'Get value of AccrualPeriod
                                        if ( not EmployeeRet.EmployeePayrollInfo.SickHours.AccrualPeriod is nothing) then
                                                Dim AccrualPeriod8810 as ENAccrualPeriod
                                                AccrualPeriod8810 = EmployeeRet.EmployeePayrollInfo.SickHours.AccrualPeriod.GetValue()
                                        End If
                                        'Get value of HoursAccrued
                                        if ( not EmployeeRet.EmployeePayrollInfo.SickHours.HoursAccrued is nothing) then
                                                Dim HoursAccrued8811 as IQBTimeIntervalType
                                                HoursAccrued8811 = EmployeeRet.EmployeePayrollInfo.SickHours.HoursAccrued.GetValue()
                                        End If
                                        'Get value of MaximumHours
                                        if ( not EmployeeRet.EmployeePayrollInfo.SickHours.MaximumHours is nothing) then
                                                Dim MaximumHours8812 as IQBTimeIntervalType
                                                MaximumHours8812 = EmployeeRet.EmployeePayrollInfo.SickHours.MaximumHours.GetValue()
                                        End If
                                        'Get value of IsResettingHoursEachNewYear
                                        if ( not EmployeeRet.EmployeePayrollInfo.SickHours.IsResettingHoursEachNewYear is nothing) then
                                                Dim IsResettingHoursEachNewYear8813 as Boolean
                                                IsResettingHoursEachNewYear8813 = EmployeeRet.EmployeePayrollInfo.SickHours.IsResettingHoursEachNewYear.GetValue()
                                        End If
                                        'Get value of HoursUsed
                                        if ( not EmployeeRet.EmployeePayrollInfo.SickHours.HoursUsed is nothing) then
                                                Dim HoursUsed8814 as IQBTimeIntervalType
                                                HoursUsed8814 = EmployeeRet.EmployeePayrollInfo.SickHours.HoursUsed.GetValue()
                                        End If
                                        'Get value of AccrualStartDate
                                        if ( not EmployeeRet.EmployeePayrollInfo.SickHours.AccrualStartDate is nothing) then
                                                Dim AccrualStartDate8815 as DateTime
                                                AccrualStartDate8815 = EmployeeRet.EmployeePayrollInfo.SickHours.AccrualStartDate.GetValue()
                                        End If
                                End If
                                if (not EmployeeRet.EmployeePayrollInfo.VacationHours. is nothing) then
                                        'Get value of HoursAvailable
                                        if ( not EmployeeRet.EmployeePayrollInfo.VacationHours.HoursAvailable is nothing) then
                                                Dim HoursAvailable8816 as IQBTimeIntervalType
                                                HoursAvailable8816 = EmployeeRet.EmployeePayrollInfo.VacationHours.HoursAvailable.GetValue()
                                        End If
                                        'Get value of AccrualPeriod
                                        if ( not EmployeeRet.EmployeePayrollInfo.VacationHours.AccrualPeriod is nothing) then
                                                Dim AccrualPeriod8817 as ENAccrualPeriod
                                                AccrualPeriod8817 = EmployeeRet.EmployeePayrollInfo.VacationHours.AccrualPeriod.GetValue()
                                        End If
                                        'Get value of HoursAccrued
                                        if ( not EmployeeRet.EmployeePayrollInfo.VacationHours.HoursAccrued is nothing) then
                                                Dim HoursAccrued8818 as IQBTimeIntervalType
                                                HoursAccrued8818 = EmployeeRet.EmployeePayrollInfo.VacationHours.HoursAccrued.GetValue()
                                        End If
                                        'Get value of MaximumHours
                                        if ( not EmployeeRet.EmployeePayrollInfo.VacationHours.MaximumHours is nothing) then
                                                Dim MaximumHours8819 as IQBTimeIntervalType
                                                MaximumHours8819 = EmployeeRet.EmployeePayrollInfo.VacationHours.MaximumHours.GetValue()
                                        End If
                                        'Get value of IsResettingHoursEachNewYear
                                        if ( not EmployeeRet.EmployeePayrollInfo.VacationHours.IsResettingHoursEachNewYear is nothing) then
                                                Dim IsResettingHoursEachNewYear8820 as Boolean
                                                IsResettingHoursEachNewYear8820 = EmployeeRet.EmployeePayrollInfo.VacationHours.IsResettingHoursEachNewYear.GetValue()
                                        End If
                                        'Get value of HoursUsed
                                        if ( not EmployeeRet.EmployeePayrollInfo.VacationHours.HoursUsed is nothing) then
                                                Dim HoursUsed8821 as IQBTimeIntervalType
                                                HoursUsed8821 = EmployeeRet.EmployeePayrollInfo.VacationHours.HoursUsed.GetValue()
                                        End If
                                        'Get value of AccrualStartDate
                                        if ( not EmployeeRet.EmployeePayrollInfo.VacationHours.AccrualStartDate is nothing) then
                                                Dim AccrualStartDate8822 as DateTime
                                                AccrualStartDate8822 = EmployeeRet.EmployeePayrollInfo.VacationHours.AccrualStartDate.GetValue()
                                        End If
                                End If
                        End If
                        'Get value of ExternalGUID
                        if ( not EmployeeRet.ExternalGUID is nothing) then
                                Dim ExternalGUID8823 as String
                                ExternalGUID8823 = EmployeeRet.ExternalGUID.GetValue()
                        End If
                        if (not EmployeeRet.DataExtRetList is nothing)
                                Dim i8824 as Integer
                                for i8824 = 0  to EmployeeRet.DataExtRetList.Count - 1
                                        Dim DataExtRet as IDataExtRet
                                        DataExtRet = EmployeeRet.DataExtRetList.GetAt(i8824)
                                        'Get value of OwnerID
                                        if ( not DataExtRetOwnerID is nothing) then
                                                Dim OwnerID8825 as String
                                                OwnerID8825 = DataExtRetOwnerID.GetValue()
                                        End If
                                        'Get value of DataExtName
                                        Dim DataExtName8826 as String
                                        DataExtName8826 = DataExtRetDataExtName.GetValue()
                                        'Get value of DataExtType
                                        Dim DataExtType8827 as ENDataExtType
                                        DataExtType8827 = DataExtRetDataExtType.GetValue()
                                        'Get value of DataExtValue
                                        Dim DataExtValue8828 as String
                                        DataExtValue8828 = DataExtRetDataExtValue.GetValue()
                                Next i8824
                        End If
                End Sub




        End Class
End Module

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
//The following sample code is generated as an illustration of
//Creating requests and parsing responses ONLY
//This code is NOT intended to show best practices or ideal code
//Use at your most careful discretion

using System;
using System.Net;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.IO;
using Interop.QBFC16;

namespace com.intuit.idn.samples
{
        public class Sample
        {
                public void  DoEmployeeQuery()
                {
                        bool sessionBegun = false;
                        bool connectionOpen = false;
                        QBSessionManager sessionManager = null;

                        try
                        {
                                //Create the session Manager object
                                sessionManager = new QBSessionManager();

                                //Create the message set request object to hold our request
                                IMsgSetRequest requestMsgSet = sessionManager.CreateMsgSetRequest("US",16,0);
                                requestMsgSet.Attributes.OnError = ENRqOnError.roeContinue;

                                BuildEmployeeQueryRq(requestMsgSet);

                                //Connect to QuickBooks and begin a session
                                sessionManager.OpenConnection("","Sample Code from OSR");
                                connectionOpen = true;
                                sessionManager.BeginSession("", ENOpenMode.omDontCare);
                                sessionBegun = true;

                                //Send the request and get the response from QuickBooks
                                IMsgSetResponse responseMsgSet = sessionManager.DoRequests(requestMsgSet);

                                //End the session and close the connection to QuickBooks
                                sessionManager.EndSession();
                                sessionBegun = false;
                                sessionManager.CloseConnection();
                                connectionOpen = false;

                                WalkEmployeeQueryRs(responseMsgSet);
                        }
                        catch (Exception e)
                        {
                                MessageBox.Show(e.Message, "Error");
                                if (sessionBegun)
                                {
                                        sessionManager.EndSession();
                                }
                                if (connectionOpen)
                                {
                                        sessionManager.CloseConnection();
                                }
                        }
                }
                void BuildEmployeeQueryRq(IMsgSetRequest requestMsgSet)
                {
                        IEmployeeQuery EmployeeQueryRq= requestMsgSet.AppendEmployeeQueryRq();
                        //Set attributes
                        //Set field value for metaData
                        EmployeeQueryRq.metaData.SetValue("IQBENmetaDataType");
                        string ORListQueryElementType8629 = "ListIDList";
                        if (ORListQueryElementType8629 == "ListIDList")
                        {
                                //Set field value for ListIDList
                                //May create more than one of these if needed
                                EmployeeQueryRq.ORListQuery.ListIDList.Add("200000-1011023419");
                        }
                        if (ORListQueryElementType8629 == "FullNameList")
                        {
                                //Set field value for FullNameList
                                //May create more than one of these if needed
                                EmployeeQueryRq.ORListQuery.FullNameList.Add("ab");
                        }
                        if (ORListQueryElementType8629 == "ListFilter")
                        {
                                //Set field value for MaxReturned
                                EmployeeQueryRq.ORListQuery.ListFilter.MaxReturned.SetValue(6);
                                //Set field value for ActiveStatus
                                EmployeeQueryRq.ORListQuery.ListFilter.ActiveStatus.SetValue(ENActiveStatus.asActiveOnly [DEFAULT]);
                                //Set field value for FromModifiedDate
                                EmployeeQueryRq.ORListQuery.ListFilter.FromModifiedDate.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false);
                                //Set field value for ToModifiedDate
                                EmployeeQueryRq.ORListQuery.ListFilter.ToModifiedDate.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false);
                                string ORNameFilterElementType8630 = "NameFilter";
                                if (ORNameFilterElementType8630 == "NameFilter")
                                {
                                        //Set field value for MatchCriterion
                                        EmployeeQueryRq.ORListQuery.ListFilter.ORNameFilter.NameFilter.MatchCriterion.SetValue(ENMatchCriterion.mcStartsWith);
                                        //Set field value for Name
                                        EmployeeQueryRq.ORListQuery.ListFilter.ORNameFilter.NameFilter.Name.SetValue("ab");
                                }
                                if (ORNameFilterElementType8630 == "NameRangeFilter")
                                {
                                        //Set field value for FromName
                                        EmployeeQueryRq.ORListQuery.ListFilter.ORNameFilter.NameRangeFilter.FromName.SetValue("ab");
                                        //Set field value for ToName
                                        EmployeeQueryRq.ORListQuery.ListFilter.ORNameFilter.NameRangeFilter.ToName.SetValue("ab");
                                }
                        }
                        //Set field value for IncludeRetElementList
                        //May create more than one of these if needed
                        EmployeeQueryRq.IncludeRetElementList.Add("ab");
                        //Set field value for OwnerIDList
                        //May create more than one of these if needed
                        EmployeeQueryRq.OwnerIDList.Add(Guid.NewGuid().ToString());
                }




                void WalkEmployeeQueryRs(IMsgSetResponse responseMsgSet)
                {
                        if (responseMsgSet == null) return;
                        IResponseList responseList = responseMsgSet.ResponseList;
                        if (responseList == null) return;
                        //if we sent only one request, there is only one response, we'll walk the list for this sample
                        for(int i=0; i < responseList.Count; i++)
                        {
                                IResponse response = responseList.GetAt(i);
                                //check the status code of the response, 0=ok, >0 is warning
                                if (response.StatusCode >= 0)
                                {
                                        //the request-specific response is in the details, make sure we have some
                                        if (response.Detail != null)
                                        {
                                                //make sure the response is the type we're expecting
                                                ENResponseType responseType = (ENResponseType)response.Type.GetValue();
                                                if (responseType == ENResponseType.rtEmployeeQueryRs)
                                                {
                                                        //upcast to more specific type here, this is safe because we checked with response.Type check above
                                                        IEmployeeRetList EmployeeRet = (IEmployeeRetList)response.Detail;
                                                        WalkEmployeeRet(EmployeeRet);
                                                }
                                        }
                                }
                        }
                }




                void WalkEmployeeRet(IEmployeeRetList EmployeeRet)
                {
                        if (EmployeeRet == null) return;
                        //Go through all the elements of IEmployeeRetList
                        //Get value of ListID
                        string ListID8631 = (string)EmployeeRet.ListID.GetValue();
                        //Get value of TimeCreated
                        DateTime TimeCreated8632 = (DateTime)EmployeeRet.TimeCreated.GetValue();
                        //Get value of TimeModified
                        DateTime TimeModified8633 = (DateTime)EmployeeRet.TimeModified.GetValue();
                        //Get value of EditSequence
                        string EditSequence8634 = (string)EmployeeRet.EditSequence.GetValue();
                        //Get value of Name
                        string Name8635 = (string)EmployeeRet.Name.GetValue();
                        //Get value of IsActive
                        if (EmployeeRet.IsActive != null)
                        {
                                bool IsActive8636 = (bool)EmployeeRet.IsActive.GetValue();
                        }
                        //Get value of Salutation
                        if (EmployeeRet.Salutation != null)
                        {
                                string Salutation8637 = (string)EmployeeRet.Salutation.GetValue();
                        }
                        //Get value of FirstName
                        if (EmployeeRet.FirstName != null)
                        {
                                string FirstName8638 = (string)EmployeeRet.FirstName.GetValue();
                        }
                        //Get value of MiddleName
                        if (EmployeeRet.MiddleName != null)
                        {
                                string MiddleName8639 = (string)EmployeeRet.MiddleName.GetValue();
                        }
                        //Get value of LastName
                        if (EmployeeRet.LastName != null)
                        {
                                string LastName8640 = (string)EmployeeRet.LastName.GetValue();
                        }
                        //Get value of JobTitle
                        if (EmployeeRet.JobTitle != null)
                        {
                                string JobTitle8641 = (string)EmployeeRet.JobTitle.GetValue();
                        }
                        if (EmployeeRet.SupervisorRef != null)
                        {
                                //Get value of ListID
                                if (EmployeeRet.SupervisorRef.ListID != null)
                                {
                                        string ListID8642 = (string)EmployeeRet.SupervisorRef.ListID.GetValue();
                                }
                                //Get value of FullName
                                if (EmployeeRet.SupervisorRef.FullName != null)
                                {
                                        string FullName8643 = (string)EmployeeRet.SupervisorRef.FullName.GetValue();
                                }
                        }
                        //Get value of Department
                        if (EmployeeRet.Department != null)
                        {
                                string Department8644 = (string)EmployeeRet.Department.GetValue();
                        }
                        //Get value of Description
                        if (EmployeeRet.Description != null)
                        {
                                string Description8645 = (string)EmployeeRet.Description.GetValue();
                        }
                        //Get value of TargetBonus
                        if (EmployeeRet.TargetBonus != null)
                        {
                                double TargetBonus8646 = (double)EmployeeRet.TargetBonus.GetValue();
                        }
                        if (EmployeeRet.EmployeeAddress != null)
                        {
                                //Get value of Addr1
                                if (EmployeeRet.EmployeeAddress.Addr1 != null)
                                {
                                        string Addr18647 = (string)EmployeeRet.EmployeeAddress.Addr1.GetValue();
                                }
                                //Get value of Addr2
                                if (EmployeeRet.EmployeeAddress.Addr2 != null)
                                {
                                        string Addr28648 = (string)EmployeeRet.EmployeeAddress.Addr2.GetValue();
                                }
                                //Get value of City
                                if (EmployeeRet.EmployeeAddress.City != null)
                                {
                                        string City8649 = (string)EmployeeRet.EmployeeAddress.City.GetValue();
                                }
                                //Get value of State
                                if (EmployeeRet.EmployeeAddress.State != null)
                                {
                                        string State8650 = (string)EmployeeRet.EmployeeAddress.State.GetValue();
                                }
                                //Get value of PostalCode
                                if (EmployeeRet.EmployeeAddress.PostalCode != null)
                                {
                                        string PostalCode8651 = (string)EmployeeRet.EmployeeAddress.PostalCode.GetValue();
                                }
                        }
                        //Get value of PrintAs
                        if (EmployeeRet.PrintAs != null)
                        {
                                string PrintAs8652 = (string)EmployeeRet.PrintAs.GetValue();
                        }
                        //Get value of Phone
                        if (EmployeeRet.Phone != null)
                        {
                                string Phone8653 = (string)EmployeeRet.Phone.GetValue();
                        }
                        //Get value of Mobile
                        if (EmployeeRet.Mobile != null)
                        {
                                string Mobile8654 = (string)EmployeeRet.Mobile.GetValue();
                        }
                        //Get value of Pager
                        if (EmployeeRet.Pager != null)
                        {
                                string Pager8655 = (string)EmployeeRet.Pager.GetValue();
                        }
                        //Get value of PagerPIN
                        if (EmployeeRet.PagerPIN != null)
                        {
                                string PagerPIN8656 = (string)EmployeeRet.PagerPIN.GetValue();
                        }
                        //Get value of AltPhone
                        if (EmployeeRet.AltPhone != null)
                        {
                                string AltPhone8657 = (string)EmployeeRet.AltPhone.GetValue();
                        }
                        //Get value of Fax
                        if (EmployeeRet.Fax != null)
                        {
                                string Fax8658 = (string)EmployeeRet.Fax.GetValue();
                        }
                        //Get value of SSN
                        if (EmployeeRet.SSN != null)
                        {
                                string SSN8659 = (string)EmployeeRet.SSN.GetValue();
                        }
                        //Get value of Email
                        if (EmployeeRet.Email != null)
                        {
                                string Email8660 = (string)EmployeeRet.Email.GetValue();
                        }
                        if (EmployeeRet.AdditionalContactRefList != null)
                        {
                                for (int i8661 = 0; i8661 < EmployeeRet.AdditionalContactRefList.Count; i8661++)
                                {
                                        IQBBaseRef QBBaseRef = EmployeeRet.AdditionalContactRefList.GetAt(i8661);
                                        //Get value of ContactName
                                        string ContactName8662 = (string)QBBaseRef.ContactName.GetValue();
                                        //Get value of ContactValue
                                        string ContactValue8663 = (string)QBBaseRef.ContactValue.GetValue();
                                }
                        }
                        if (EmployeeRet.EmergencyContacts != null)
                        {
                                if (EmployeeRet.EmergencyContacts.PrimaryContact != null)
                                {
                                        //Get value of ContactName
                                        string ContactName8664 = (string)EmployeeRet.EmergencyContacts.PrimaryContact.ContactName.GetValue();
                                        //Get value of ContactValue
                                        string ContactValue8665 = (string)EmployeeRet.EmergencyContacts.PrimaryContact.ContactValue.GetValue();
                                        //Get value of Relation
                                        if (EmployeeRet.EmergencyContacts.PrimaryContact.Relation != null)
                                        {
                                                ENRelation Relation8666 = (ENRelation)EmployeeRet.EmergencyContacts.PrimaryContact.Relation.GetValue();
                                        }
                                }
                                if (EmployeeRet.EmergencyContacts.SecondaryContact != null)
                                {
                                        //Get value of ContactName
                                        string ContactName8667 = (string)EmployeeRet.EmergencyContacts.SecondaryContact.ContactName.GetValue();
                                        //Get value of ContactValue
                                        string ContactValue8668 = (string)EmployeeRet.EmergencyContacts.SecondaryContact.ContactValue.GetValue();
                                        //Get value of Relation
                                        if (EmployeeRet.EmergencyContacts.SecondaryContact.Relation != null)
                                        {
                                                ENRelation Relation8669 = (ENRelation)EmployeeRet.EmergencyContacts.SecondaryContact.Relation.GetValue();
                                        }
                                }
                        }
                        //Get value of EmployeeType
                        if (EmployeeRet.EmployeeType != null)
                        {
                                ENEmployeeType EmployeeType8670 = (ENEmployeeType)EmployeeRet.EmployeeType.GetValue();
                        }
                        //Get value of PartOrFullTime
                        if (EmployeeRet.PartOrFullTime != null)
                        {
                                ENPartOrFullTime PartOrFullTime8671 = (ENPartOrFullTime)EmployeeRet.PartOrFullTime.GetValue();
                        }
                        //Get value of Exempt
                        if (EmployeeRet.Exempt != null)
                        {
                                ENExempt Exempt8672 = (ENExempt)EmployeeRet.Exempt.GetValue();
                        }
                        //Get value of KeyEmployee
                        if (EmployeeRet.KeyEmployee != null)
                        {
                                ENKeyEmployee KeyEmployee8673 = (ENKeyEmployee)EmployeeRet.KeyEmployee.GetValue();
                        }
                        //Get value of Gender
                        if (EmployeeRet.Gender != null)
                        {
                                ENGender Gender8674 = (ENGender)EmployeeRet.Gender.GetValue();
                        }
                        //Get value of HiredDate
                        if (EmployeeRet.HiredDate != null)
                        {
                                DateTime HiredDate8675 = (DateTime)EmployeeRet.HiredDate.GetValue();
                        }
                        //Get value of OriginalHireDate
                        if (EmployeeRet.OriginalHireDate != null)
                        {
                                DateTime OriginalHireDate8676 = (DateTime)EmployeeRet.OriginalHireDate.GetValue();
                        }
                        //Get value of AdjustedServiceDate
                        if (EmployeeRet.AdjustedServiceDate != null)
                        {
                                DateTime AdjustedServiceDate8677 = (DateTime)EmployeeRet.AdjustedServiceDate.GetValue();
                        }
                        //Get value of ReleasedDate
                        if (EmployeeRet.ReleasedDate != null)
                        {
                                DateTime ReleasedDate8678 = (DateTime)EmployeeRet.ReleasedDate.GetValue();
                        }
                        //Get value of BirthDate
                        if (EmployeeRet.BirthDate != null)
                        {
                                DateTime BirthDate8679 = (DateTime)EmployeeRet.BirthDate.GetValue();
                        }
                        //Get value of USCitizen
                        if (EmployeeRet.USCitizen != null)
                        {
                                ENUSCitizen USCitizen8680 = (ENUSCitizen)EmployeeRet.USCitizen.GetValue();
                        }
                        //Get value of Ethnicity
                        if (EmployeeRet.Ethnicity != null)
                        {
                                ENEthnicity Ethnicity8681 = (ENEthnicity)EmployeeRet.Ethnicity.GetValue();
                        }
                        //Get value of Disabled
                        if (EmployeeRet.Disabled != null)
                        {
                                ENDisabled Disabled8682 = (ENDisabled)EmployeeRet.Disabled.GetValue();
                        }
                        //Get value of DisabilityDesc
                        if (EmployeeRet.DisabilityDesc != null)
                        {
                                string DisabilityDesc8683 = (string)EmployeeRet.DisabilityDesc.GetValue();
                        }
                        //Get value of OnFile
                        if (EmployeeRet.OnFile != null)
                        {
                                ENOnFile OnFile8684 = (ENOnFile)EmployeeRet.OnFile.GetValue();
                        }
                        //Get value of WorkAuthExpireDate
                        if (EmployeeRet.WorkAuthExpireDate != null)
                        {
                                DateTime WorkAuthExpireDate8685 = (DateTime)EmployeeRet.WorkAuthExpireDate.GetValue();
                        }
                        //Get value of USVeteran
                        if (EmployeeRet.USVeteran != null)
                        {
                                ENUSVeteran USVeteran8686 = (ENUSVeteran)EmployeeRet.USVeteran.GetValue();
                        }
                        //Get value of MilitaryStatus
                        if (EmployeeRet.MilitaryStatus != null)
                        {
                                ENMilitaryStatus MilitaryStatus8687 = (ENMilitaryStatus)EmployeeRet.MilitaryStatus.GetValue();
                        }
                        //Get value of AccountNumber
                        if (EmployeeRet.AccountNumber != null)
                        {
                                string AccountNumber8688 = (string)EmployeeRet.AccountNumber.GetValue();
                        }
                        //Get value of Notes
                        if (EmployeeRet.Notes != null)
                        {
                                string Notes8689 = (string)EmployeeRet.Notes.GetValue();
                        }
                        if (EmployeeRet.AdditionalNotesRetList != null)
                        {
                                for (int i8690 = 0; i8690 < EmployeeRet.AdditionalNotesRetList.Count; i8690++)
                                {
                                        IAdditionalNotesRet AdditionalNotesRet = EmployeeRet.AdditionalNotesRetList.GetAt(i8690);
                                        //Get value of NoteID
                                        int NoteID8691 = (int)AdditionalNotesRet.NoteID.GetValue();
                                        //Get value of Date
                                        DateTime Date8692 = (DateTime)AdditionalNotesRet.Date.GetValue();
                                        //Get value of Note
                                        string Note8693 = (string)AdditionalNotesRet.Note.GetValue();
                                }
                        }
                        if (EmployeeRet.BillingRateRef != null)
                        {
                                //Get value of ListID
                                if (EmployeeRet.BillingRateRef.ListID != null)
                                {
                                        string ListID8694 = (string)EmployeeRet.BillingRateRef.ListID.GetValue();
                                }
                                //Get value of FullName
                                if (EmployeeRet.BillingRateRef.FullName != null)
                                {
                                        string FullName8695 = (string)EmployeeRet.BillingRateRef.FullName.GetValue();
                                }
                        }
                        if (EmployeeRet.EmployeePayrollInfo != null)
                        {
                                //Get value of PayPeriod
                                if (EmployeeRet.EmployeePayrollInfo.PayPeriod != null)
                                {
                                        ENPayPeriod PayPeriod8696 = (ENPayPeriod)EmployeeRet.EmployeePayrollInfo.PayPeriod.GetValue();
                                }
                                if (EmployeeRet.EmployeePayrollInfo.ClassRef != null)
                                {
                                        //Get value of ListID
                                        if (EmployeeRet.EmployeePayrollInfo.ClassRef.ListID != null)
                                        {
                                                string ListID8697 = (string)EmployeeRet.EmployeePayrollInfo.ClassRef.ListID.GetValue();
                                        }
                                        //Get value of FullName
                                        if (EmployeeRet.EmployeePayrollInfo.ClassRef.FullName != null)
                                        {
                                                string FullName8698 = (string)EmployeeRet.EmployeePayrollInfo.ClassRef.FullName.GetValue();
                                        }
                                }
                                if (EmployeeRet.EmployeePayrollInfo.OREarnings != null)
                                {
                                        if (EmployeeRet.EmployeePayrollInfo.OREarnings.ClearEarnings != null)
                                        {
                                                //Get value of ClearEarnings
                                                if (EmployeeRet.EmployeePayrollInfo.OREarnings.ClearEarnings != null)
                                                {
                                                        bool ClearEarnings8700 = (bool)EmployeeRet.EmployeePayrollInfo.OREarnings.ClearEarnings.GetValue();
                                                }
                                        }
                                        if (EmployeeRet.EmployeePayrollInfo.OREarnings.EarningsList != null)
                                        {
                                                if (EmployeeRet.EmployeePayrollInfo.OREarnings.EarningsList != null)
                                                {
                                                        for (int i8701 = 0; i8701 < EmployeeRet.EmployeePayrollInfo.OREarnings.EarningsList.Count; i8701++)
                                                        {
                                                                IEarnings Earnings = EmployeeRet.EmployeePayrollInfo.OREarnings.EarningsList.GetAt(i8701);
                                                                //Get value of ListID
                                                                if (Earnings.PayrollItemWageRef.ListID != null)
                                                                {
                                                                        string ListID8702 = (string)Earnings.PayrollItemWageRef.ListID.GetValue();
                                                                }
                                                                //Get value of FullName
                                                                if (Earnings.PayrollItemWageRef.FullName != null)
                                                                {
                                                                        string FullName8703 = (string)Earnings.PayrollItemWageRef.FullName.GetValue();
                                                                }
                                                                if (Earnings.ORRate != null)
                                                                {
                                                                        if (Earnings.ORRate.Rate != null)
                                                                        {
                                                                                //Get value of Rate
                                                                                if (Earnings.ORRate.Rate != null)
                                                                                {
                                                                                double Rate8705 = (double)Earnings.ORRate.Rate.GetValue();
                                                                                }
                                                                        }
                                                                        if (Earnings.ORRate.RatePercent != null)
                                                                        {
                                                                                //Get value of RatePercent
                                                                                if (Earnings.ORRate.RatePercent != null)
                                                                                {
                                                                                double RatePercent8706 = (double)Earnings.ORRate.RatePercent.GetValue();
                                                                                }
                                                                        }
                                                                }
                                                        }
                                                }
                                        }
                                }
                                //Get value of IsUsingTimeDataToCreatePaychecks
                                if (EmployeeRet.EmployeePayrollInfo.IsUsingTimeDataToCreatePaychecks != null)
                                {
                                        bool IsUsingTimeDataToCreatePaychecks8707 = (bool)EmployeeRet.EmployeePayrollInfo.IsUsingTimeDataToCreatePaychecks.GetValue();
                                }
                                //Get value of UseTimeDataToCreatePaychecks
                                if (EmployeeRet.EmployeePayrollInfo.UseTimeDataToCreatePaychecks != null)
                                {
                                        ENUseTimeDataToCreatePaychecks UseTimeDataToCreatePaychecks8708 = (ENUseTimeDataToCreatePaychecks)EmployeeRet.EmployeePayrollInfo.UseTimeDataToCreatePaychecks.GetValue();
                                }
                                if (EmployeeRet.EmployeePayrollInfo.SickHours != null)
                                {
                                        //Get value of HoursAvailable
                                        if (EmployeeRet.EmployeePayrollInfo.SickHours.HoursAvailable != null)
                                        {
                                                IQBTimeIntervalType HoursAvailable8709 = (IQBTimeIntervalType)EmployeeRet.EmployeePayrollInfo.SickHours.HoursAvailable.GetValue();
                                        }
                                        //Get value of AccrualPeriod
                                        if (EmployeeRet.EmployeePayrollInfo.SickHours.AccrualPeriod != null)
                                        {
                                                ENAccrualPeriod AccrualPeriod8710 = (ENAccrualPeriod)EmployeeRet.EmployeePayrollInfo.SickHours.AccrualPeriod.GetValue();
                                        }
                                        //Get value of HoursAccrued
                                        if (EmployeeRet.EmployeePayrollInfo.SickHours.HoursAccrued != null)
                                        {
                                                IQBTimeIntervalType HoursAccrued8711 = (IQBTimeIntervalType)EmployeeRet.EmployeePayrollInfo.SickHours.HoursAccrued.GetValue();
                                        }
                                        //Get value of MaximumHours
                                        if (EmployeeRet.EmployeePayrollInfo.SickHours.MaximumHours != null)
                                        {
                                                IQBTimeIntervalType MaximumHours8712 = (IQBTimeIntervalType)EmployeeRet.EmployeePayrollInfo.SickHours.MaximumHours.GetValue();
                                        }
                                        //Get value of IsResettingHoursEachNewYear
                                        if (EmployeeRet.EmployeePayrollInfo.SickHours.IsResettingHoursEachNewYear != null)
                                        {
                                                bool IsResettingHoursEachNewYear8713 = (bool)EmployeeRet.EmployeePayrollInfo.SickHours.IsResettingHoursEachNewYear.GetValue();
                                        }
                                        //Get value of HoursUsed
                                        if (EmployeeRet.EmployeePayrollInfo.SickHours.HoursUsed != null)
                                        {
                                                IQBTimeIntervalType HoursUsed8714 = (IQBTimeIntervalType)EmployeeRet.EmployeePayrollInfo.SickHours.HoursUsed.GetValue();
                                        }
                                        //Get value of AccrualStartDate
                                        if (EmployeeRet.EmployeePayrollInfo.SickHours.AccrualStartDate != null)
                                        {
                                                DateTime AccrualStartDate8715 = (DateTime)EmployeeRet.EmployeePayrollInfo.SickHours.AccrualStartDate.GetValue();
                                        }
                                }
                                if (EmployeeRet.EmployeePayrollInfo.VacationHours != null)
                                {
                                        //Get value of HoursAvailable
                                        if (EmployeeRet.EmployeePayrollInfo.VacationHours.HoursAvailable != null)
                                        {
                                                IQBTimeIntervalType HoursAvailable8716 = (IQBTimeIntervalType)EmployeeRet.EmployeePayrollInfo.VacationHours.HoursAvailable.GetValue();
                                        }
                                        //Get value of AccrualPeriod
                                        if (EmployeeRet.EmployeePayrollInfo.VacationHours.AccrualPeriod != null)
                                        {
                                                ENAccrualPeriod AccrualPeriod8717 = (ENAccrualPeriod)EmployeeRet.EmployeePayrollInfo.VacationHours.AccrualPeriod.GetValue();
                                        }
                                        //Get value of HoursAccrued
                                        if (EmployeeRet.EmployeePayrollInfo.VacationHours.HoursAccrued != null)
                                        {
                                                IQBTimeIntervalType HoursAccrued8718 = (IQBTimeIntervalType)EmployeeRet.EmployeePayrollInfo.VacationHours.HoursAccrued.GetValue();
                                        }
                                        //Get value of MaximumHours
                                        if (EmployeeRet.EmployeePayrollInfo.VacationHours.MaximumHours != null)
                                        {
                                                IQBTimeIntervalType MaximumHours8719 = (IQBTimeIntervalType)EmployeeRet.EmployeePayrollInfo.VacationHours.MaximumHours.GetValue();
                                        }
                                        //Get value of IsResettingHoursEachNewYear
                                        if (EmployeeRet.EmployeePayrollInfo.VacationHours.IsResettingHoursEachNewYear != null)
                                        {
                                                bool IsResettingHoursEachNewYear8720 = (bool)EmployeeRet.EmployeePayrollInfo.VacationHours.IsResettingHoursEachNewYear.GetValue();
                                        }
                                        //Get value of HoursUsed
                                        if (EmployeeRet.EmployeePayrollInfo.VacationHours.HoursUsed != null)
                                        {
                                                IQBTimeIntervalType HoursUsed8721 = (IQBTimeIntervalType)EmployeeRet.EmployeePayrollInfo.VacationHours.HoursUsed.GetValue();
                                        }
                                        //Get value of AccrualStartDate
                                        if (EmployeeRet.EmployeePayrollInfo.VacationHours.AccrualStartDate != null)
                                        {
                                                DateTime AccrualStartDate8722 = (DateTime)EmployeeRet.EmployeePayrollInfo.VacationHours.AccrualStartDate.GetValue();
                                        }
                                }
                        }
                        //Get value of ExternalGUID
                        if (EmployeeRet.ExternalGUID != null)
                        {
                                string ExternalGUID8723 = (string)EmployeeRet.ExternalGUID.GetValue();
                        }
                        if (EmployeeRet.DataExtRetList != null)
                        {
                                for (int i8724 = 0; i8724 < EmployeeRet.DataExtRetList.Count; i8724++)
                                {
                                        IDataExtRet DataExtRet = EmployeeRet.DataExtRetList.GetAt(i8724);
                                        //Get value of OwnerID
                                        if (DataExtRet.OwnerID != null)
                                        {
                                                string OwnerID8725 = (string)DataExtRet.OwnerID.GetValue();
                                        }
                                        //Get value of DataExtName
                                        string DataExtName8726 = (string)DataExtRet.DataExtName.GetValue();
                                        //Get value of DataExtType
                                        ENDataExtType DataExtType8727 = (ENDataExtType)DataExtRet.DataExtType.GetValue();
                                        //Get value of DataExtValue
                                        string DataExtValue8728 = (string)DataExtRet.DataExtValue.GetValue();
                                }
                        }
                }




        }
}