VendorQuery

Returns the vendors specified in the filter criteria.


Request

Response

XMLOPS

VB.NET

C#

Tag Type Max length Implementation Required

IVendorQuery

Returns the vendors specified in the filter criteria.
       

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|  

iterator

The iterator attribute provided with most query types also allows you to break down query results in smaller and more manageable chunks of data. An iterator results in responses that contain only the specified number of objects. Iterators are only valid for the application that starts them, and they are only valid for the current QuickBooks session.
IQBENiteratorType   5.0|us.png|  

iteratorID

The iterator query attribute is provided with most query types to allow you to break down query results into smaller and more manageable chunks of data. An iterator results in responses that contain only the specified number of objects. The iterator is created when a query contains the iterator attribute set to Start, along with a MaxReturn value specifying how many records are to be returned in each iteration. The response to that first query iteration contains, along with the response data, an IteratorID value that uniquely identifies that iterator. This is important because you can have many iterators active at the same time. Accordingly, in subsequent iterations of that query, you need to supply that returned iteratorID so the SDK knows where to resume the iteration.
IQBUUIDType   5.0|us.png|  

MaxReturned

This element is used for limiting the number of objects returned in the query to the number specified in MaxReturned. It is required if you use the Iterator attribute to iterate through large or potentially large query returns. When used with the Iterator, MaxReturned specifies the number of records returned in each iteration. It can be modified during the iteration. For details on the Iterator, please refer to the QBPOS SDK Programming Guide. A less optimal, but still possible way to use this element is as follows. You can use this element by itself to chunk up data, by initially using a range filter with the desired starting (From range) and ending range (To range). Then, in subsequent queries, leave the To range alone, but change the From range to coincide with the last object from the previous query.
IQBIntType      

OwnerIDList

The list of Owner IDs in the requests. An ownerID refers to the owner of a data extension:If OwnerID is 0, this is a public data extension. For example, if you intend to use this with a custom field that is supported in the UI, you must use an owner ID of 0.If OwnerID is a GUID, for example {6B063959-81B0-4622-85D6-F548C8CCB517}, this field is a private data extension defined by an integrated application. 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      

ListID

The unique ID returned by QBPOS for this object. If supplied in a request, the ListID is a reference to an object required in the request. For example, in a SalesOrder or PurchaseOrder line item, the ListID that is required is an Item list ID.
IQBIDType      

ORTimeCreatedFilters

IORTimeCreatedFilters   1.1  

TimeCreatedFilter

Filters by the object’s time created value.
ITimeCreatedFilter      

MatchNumericCriterion

Specifies how the specified numeric value will filter the target objects, that is, specifies the the comparison that will be used.
IQBENMatchNumericCriterionType     Y

TimeCreated

The timestamp indicating the time when this object was created in QBPOS.
IQBDateTimeType     Y

TimeCreatedRangeFilter

Filters by a range of time created values.
ITimeCreatedRangeFilter      

FromTimeCreated

The beginning of the range.
IQBDateTimeType     Y

ToTimeCreated

The end of the range.
IQBDateTimeType     Y

ORTimeModifiedFilters

IORTimeModifiedFilters      

TimeModifiedFilter

Searches for objects that were modified before, at, or after the specified time.
ITimeModifiedFilter      

MatchNumericCriterion

Specifies how the specified numeric value will filter the target objects, that is, specifies the the comparison that will be used.
IQBENMatchNumericCriterionType     Y

TimeModified

The time when the object was modified by QBPOS.
IQBDateTimeType     Y

TimeModifiedRangeFilter

Searches for objects that were modified within the specified time range.
ITimeModifiedRangeFilter      

FromTimeModified

First time value possible in the range.
IQBDateTimeType     Y

ToTimeModified

Last time value of the range.
IQBDateTimeType     Y

ORAccountNumberFilters

IORAccountNumberFilters      

AccountNumberFilter

Filters vendors by their AccountNumber field.
IAccountNumberFilter      

MatchStringCriterion

This specifies which part of the string is being looked at.
IQBENMatchStringCriterionType     Y

AccountNumber

Your account number with the vendor. This number is displayed on purchase orders that are created for the vendor.
IQBStringType 99 chars   Y

AccountNumberRangeFilter

Filters vendors by a range of account number values.
IAccountNumberRangeFilter      

FromAccountNumber

Start of the account number range.
IQBStringType 99 chars   Y

ToAccountNumber

End of the account number range.
IQBStringType 99 chars   Y

ORCityFilters

IORCityFilters      

CityFilter

Filters vendors by their City value.
ICityFilter      

MatchStringCriterion

This specifies which part of the string is being looked at.
IQBENMatchStringCriterionType     Y

City

The city name in the address.
IQBStringType 31 chars   Y

CityRangeFilter

Filters vendors by range of City values.
ICityRangeFilter      

FromCity

Start of the City range.
IQBStringType 31 chars   Y

ToCity

End of the City range.
IQBStringType 31 chars   Y

ORCompanyNameFilters

IORCompanyNameFilters      

CompanyNameFilter

Filters objects by the customer or vendor’s company name value.
ICompanyNameFilter      

MatchStringCriterion

This specifies which part of the string is being looked at.
IQBENMatchStringCriterionType     Y

CompanyName

The name of the business.
IQBStringType 41 chars   Y

CompanyNameRangeFilter

Filters objects by a range of company name values.
ICompanyNameRangeFilter      

FromCompanyName

Start of the range of CompanyName values.
IQBStringType 41 chars   Y

ToCompanyName

End of the range of CompanyName values.
IQBStringType 41 chars   Y

ORCountryFilters

IORCountryFilters   1.1  

CountryFilter

Filters by the Country value.
ICountryFilter      

MatchStringCriterion

This specifies which part of the string is being looked at.
IQBENMatchStringCriterionType     Y

Country

The country of residence of this employee.
IQBStringType 31 chars   Y

CountryRangeFilter

Filters by a range of Country values.
ICountryRangeFilter      

FromCountry

Beginning of the range.
IQBStringType 31 chars   Y

ToCountry

End of the range.
IQBStringType 31 chars   Y

OREMailFilters

IOREMailFilters      

EMailFilter

Filters by email address.
IEMailFilter      

MatchStringCriterion

This specifies which part of the string is being looked at.
IQBENMatchStringCriterionType     Y

EMail

The email address.
IQBStringType 99 chars   Y

EMailRangeFilter

Filters by a range of email addresses.
IEMailRangeFilter      

FromEMail

Start of the email range.
IQBStringType 99 chars   Y

ToEMail

End of the email range.
IQBStringType 99 chars   Y

ORFirstNameFilters

IORFirstNameFilters      

FirstNameFilter

Filters by the first name.
IFirstNameFilter      

MatchStringCriterion

This specifies which part of the string is being looked at.
IQBENMatchStringCriterionType     Y

FirstName

The first name.
IQBStringType 30 chars   Y

FirstNameRangeFilter

Filters by a range of first names.
IFirstNameRangeFilter      

FromFirstName

Start of the first name range.
IQBStringType 30 chars   Y

ToFirstName

End of the first name range.
IQBStringType 30 chars   Y

IsInactive

Indicates whether the item is currently active.
IQBBoolType      

ORLastNameFilters

IORLastNameFilters      

LastNameFilter

Filters by the last name.
ILastNameFilter      

MatchStringCriterion

This specifies which part of the string is being looked at.
IQBENMatchStringCriterionType     Y

LastName

The last name.
IQBStringType 30 chars   Y

LastNameRangeFilter

Filters by a range of last names.
ILastNameRangeFilter      

FromLastName

Start of the last name range.
IQBStringType 30 chars   Y

ToLastName

End of the last name range.
IQBStringType 30 chars   Y

ORNotesFilters

IORNotesFilters      

NotesFilter

Filters by the contents of the Notes field.
INotesFilter      

MatchStringCriterion

This specifies which part of the string is being looked at.
IQBENMatchStringCriterionType     Y

Notes

Use this field to record optional information about the object, such as employee or customer, such as birthday, requested items, clothing sizes, etc. Notice that notes are not exchanged with QuickBooks Financial Software.
IQBStringType 245 chars   Y

NotesRangeFilter

Filters by a range of note values.
INotesRangeFilter      

FromNotes

Start of the Notes range.
IQBStringType 245 chars   Y

ToNotes

End of the Notes range.
IQBStringType 245 chars   Y

ORPhoneFilters

IORPhoneFilters      

PhoneFilter

Filters by the Phone value.
IPhoneFilter      

MatchStringCriterion

This specifies which part of the string is being looked at.
IQBENMatchStringCriterionType     Y

Phone

Primary Telephone number of this person or entity.
IQBStringType 40 chars   Y

PhoneRangeFilter

Filters by a range of Phone values.
IPhoneRangeFilter      

FromPhone

Start of the phone number range.
IQBStringType 40 chars   Y

ToPhone

End of the phone number range.
IQBStringType 40 chars   Y

ORPhone2Filters

IORPhone2Filters      

Phone2Filter

Filters by the Phone2 value.
IPhone2Filter      

MatchStringCriterion

This specifies which part of the string is being looked at.
IQBENMatchStringCriterionType     Y

Phone2

Alternate phone number or fax number for this person or entity. This maps to Phone 2 in the QBPOS UI.
IQBStringType 40 chars   Y

Phone2RangeFilter

Filters by a range of Phone2 values.
IPhone2RangeFilter      

FromPhone2

Beginning of the range.
IQBStringType 40 chars   Y

ToPhone2

End of the range.
IQBStringType 40 chars   Y

ORPhone3Filters

IORPhone3Filters   1.1  

Phone3Filter

Filters by Phone3 values.
IPhone3Filter      

MatchStringCriterion

This specifies which part of the string is being looked at.
IQBENMatchStringCriterionType     Y

Phone3

Alternate phone number or fax number for this person or entity. This maps to Alt. Phone in the QBPOS UI.
IQBStringType 40 chars   Y

Phone3RangeFilter

Filters by a range of Phone3 values.
IPhone3RangeFilter      

FromPhone3

Beginning of the range.
IQBStringType 40 chars   Y

ToPhone3

End of the range.
IQBStringType 40 chars   Y

ORPhone4Filters

IORPhone4Filters   1.1  

Phone4Filter

Filters by Phone4 values.
IPhone4Filter      

MatchStringCriterion

This specifies which part of the string is being looked at.
IQBENMatchStringCriterionType     Y

Phone4

Alternate phone number, fax number, or other contact information for this person or entity. This maps to Alt. Contact in the QBPOS UI.
IQBStringType 40 chars   Y

Phone4RangeFilter

Filters by a range of Phone4 values.
IPhone4RangeFilter      

FromPhone4

Beginning of the range.
IQBStringType 40 chars   Y

ToPhone4

End of the range.
IQBStringType 40 chars   Y

ORPostalCodeFilters

IORPostalCodeFilters      

PostalCodeFilter

Filters by postal code.
IPostalCodeFilter      

MatchStringCriterion

This specifies which part of the string is being looked at.
IQBENMatchStringCriterionType     Y

PostalCode

The postal code used in the address.
IQBStringType 13 chars   Y

PostalCodeRangeFilter

Filters by a range of postal codes.
IPostalCodeRangeFilter      

FromPostalCode

Start of the postal code range.
IQBStringType 13 chars   Y

ToPostalCode

End of the postal code range.
IQBStringType 13 chars   Y

ORSalutationFilters

IORSalutationFilters      

SalutationFilter

Filters customers or vendors by their Salutation field value.
ISalutationFilter      

MatchStringCriterion

This specifies which part of the string is being looked at.
IQBENMatchStringCriterionType     Y

Salutation

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

SalutationRangeFilter

Filters customers or vendors by a range of salutation values.
ISalutationRangeFilter      

FromSalutation

Start of the salutation range.
IQBStringType 15 chars   Y

ToSalutation

End of the salutation range.
IQBStringType 15 chars   Y

ORStateFilters

IORStateFilters      

StateFilter

Filters by the State field value.
IStateFilter      

MatchStringCriterion

This specifies which part of the string is being looked at.
IQBENMatchStringCriterionType     Y

State

The state name in the address.
IQBStringType 21 chars   Y

StateRangeFilter

Filters by a range of State values.
IStateRangeFilter      

FromState

Start of the state range.
IQBStringType 21 chars   Y

ToState

End of the State range.
IQBStringType 21 chars   Y

StoreExchangeStatus

In multi store configurations, if the customer’s information has changed, this information is updated at the headquarters store. This response field indicates whether the information was successfully updated or not.
IQBENStoreExchangeStatusType      

ORStreetFilters

IORStreetFilters      

StreetFilter

Filters by the Street address value.
IStreetFilter      

MatchStringCriterion

This specifies which part of the string is being looked at.
IQBENMatchStringCriterionType     Y

Street

Street Address of the vendor, customer, or other addressee.
IQBStringType 41 chars   Y

StreetRangeFilter

Filters by a range of Street address values.
IStreetRangeFilter      

FromStreet

Beginning of the range.
IQBStringType 41 chars   Y

ToStreet

End of the range.
IQBStringType 41 chars   Y

ORStreet2Filters

IORStreet2Filters   3.0  

Street2Filter

Filtering by the street.
IStreet2Filter      

MatchStringCriterion

This specifies which part of the string is being looked at.
IQBENMatchStringCriterionType     Y

Street2

Street Address of the vendor, customer, or other addressee.
IQBStringType 41 chars   Y

Street2RangeFilter

Filtering by the street range.
IStreet2RangeFilter      

FromStreet2

Start of the street range.
IQBStringType 41 chars   Y

ToStreet2

End of street range.
IQBStringType 41 chars   Y

ORTermsDiscountFilters

IORTermsDiscountFilters      

TermsDiscountFilter

Filters by TermsDiscount.
ITermsDiscountFilter      

MatchNumericCriterion

Specifies how the specified numeric value will filter the target objects, that is, specifies the the comparison that will be used.
IQBENMatchNumericCriterionType     Y

TermsDiscount

The TermsDiscount field specifies the discount percentage. A discount is applied by the vendor if payment is received on or before the number of days specified in the TermsDiscountDays field for that vendor. Terms-related discounts for vendors are created or modified in the VendorAdd/VendorMod fields TermsDiscountDays and TermsDiscount.
IQBFloatType     Y

TermsDiscountRangeFilter

Filters by a range of TermsDiscount values.
ITermsDiscountRangeFilter      

FromTermsDiscount

Starting TermsDiscount value in the range of TermsDiscount values.
IQBFloatType     Y

ToTermsDiscount

Ending TermsDiscount value in the range of TermsDiscount values.
IQBFloatType     Y

ORTermsDiscountDaysFilters

IORTermsDiscountDaysFilters      

TermsDiscountDaysFilter

Filters by the TermsDiscountDays field.
ITermsDiscountDaysFilter      

MatchNumericCriterion

Specifies how the specified numeric value will filter the target objects, that is, specifies the the comparison that will be used.
IQBENMatchNumericCriterionType     Y

TermsDiscountDays

The TermsDiscountDays field specifies the number of days after the invoice date in which payment must be received in order to obtain the discount percentage. A discount is applied by the vendor if payment is received on or before the number of days specified in the TermsDiscountDays field for that vendor. Terms-related discounts for vendors are created or modified in the VendorAdd/VendorMod fields TermsDiscountDays and TermsDiscount.
IQBIntType     Y

TermsDiscountDaysRangeFilter

Filters by a range of TermsDiscountDays values.
ITermsDiscountDaysRangeFilter      

FromTermsDiscountDays

Starting TermsDiscountDays value in the range of TermsDiscountDays values.
IQBIntType     Y

ToTermsDiscountDays

Ending TermsDiscountDays value in the range of TermsDiscountDays values.
IQBIntType     Y

ORTermsNetDaysFilters

IORTermsNetDaysFilters      

TermsNetDaysFilter

Filters by the TermsNetDays field.
ITermsNetDaysFilter      

MatchNumericCriterion

Specifies how the specified numeric value will filter the target objects, that is, specifies the the comparison that will be used.
IQBENMatchNumericCriterionType     Y

TermsNetDays

This establishes the vendor’s payment due date, which is based on the vendor’s invoice date. The due date is established by the number of days specified in this field after the invoice date. Payment must be made within this number of days.
IQBIntType     Y

TermsNetDaysRangeFilter

Filters by a range of TermsNetDays values.
ITermsNetDaysRangeFilter      

FromTermsNetDays

Starting TermsNetDays value in the range of TermsNetDays values.
IQBIntType     Y

ToTermsNetDays

Ending TermsNetDays value in the range of TermsNetDays values.
IQBIntType     Y

ORVendorCodeFilters

IORVendorCodeFilters      

VendorCodeFilter

Filters items by their Vendor Code values.
IVendorCodeFilter      

MatchStringCriterion

This specifies which part of the string is being looked at.
IQBENMatchStringCriterionType     Y

VendorCode

The code assigned to the vendor specified for the item.
IQBStringType 3 chars   Y

VendorCodeRangeFilter

Filters items by the specified range of Vendor Code values.
IVendorCodeRangeFilter      

FromVendorCode

Start of the Vendor Code range.
IQBStringType 3 chars   Y

ToVendorCode

End of the Vendor Code range.
IQBStringType 3 chars   Y

IncludeRetElementList

You can use the IncludeRetElement feature to restrict the data returned in the response to the specified qbposXML field here. If you do this, only those elements specified will be returned. To use this feature, you simply add the qbposXML element name to the IncludeRetElementList. The following example shows how to do this, specifying that only the CreatedBy and ClockOutTime elements are to be returned in the TimeEntryAdd response: Dim MyTimeEntry As ITimeEntryAdd Set MyTimeEntry = requestMsgSet.AppendTimeEntryAddRq MyTimeEntry.IncludeRetElementList.Add “CreatedBy” MyTimeEntry.IncludeRetElementList.Add “ClockOutTime” ‘ set the other properties as desired…
IBSTRList 50 chars 2.0  
Tag Type Max length Implementation Required

IResponse

Returns the vendors specified in the filter criteria.
       

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

iteratorRemainingCount

This attribute is provided in the response in a query using iterators, indicating the number of objects remaining in the iteration. This can help you specify a MaxReturn value tailored to the number of objects still to be iterated through in your query.
IQBIntType   5.0|us.png| Y

iteratorID

The iterator query attribute is provided with most query types to allow you to break down query results into smaller and more manageable chunks of data. An iterator results in responses that contain only the specified number of objects. The iterator is created when a query contains the iterator attribute set to Start, along with a MaxReturn value specifying how many records are to be returned in each iteration. The response to that first query iteration contains, along with the response data, an IteratorID value that uniquely identifies that iterator. This is important because you can have many iterators active at the same time. Accordingly, in subsequent iterations of that query, you need to supply that returned iteratorID so the SDK knows where to resume the iteration.
IQBUUIDType   5.0|us.png| Y

Detail

IVendorRetList      

(List of IVendorRet Objects)

       

ListID

The unique ID returned by QBPOS for this object. If supplied in a request, the ListID is a reference to an object required in the request. For example, in a SalesOrder or PurchaseOrder line item, the ListID that is required is an Item list ID.
IQBIDType      

TimeCreated

The timestamp indicating the time when this object was created in QBPOS.
IQBDateTimeType   1.1  

TimeModified

The time when the object was modified by QBPOS.
IQBDateTimeType      

AccountNumber

Your account number with the vendor. This number is displayed on purchase orders that are created for the vendor.
IQBStringType 99 chars    

City

The city name in the address.
IQBStringType 31 chars    

CompanyName

The name of the business.
IQBStringType 41 chars    

Country

The country of residence of this employee.
IQBStringType 31 chars 1.1  

EMail

The email address.
IQBStringType 99 chars    

FirstName

The first name.
IQBStringType 30 chars    

IsInactive

Indicates whether the item is currently active.
IQBBoolType      

LastName

The last name.
IQBStringType 30 chars    

Notes

Any optional information about the vendor, such as lead time, FOB location, and so on.
IQBStringType 245 chars    

Phone

Primary Telephone number of this person or entity.
IQBStringType 40 chars    

Phone2

Alternate phone number or fax number for this person or entity. This maps to Phone 2 in the QBPOS UI.
IQBStringType 40 chars    

Phone3

Alternate phone number or fax number for this person or entity. This maps to Alt. Phone in the QBPOS UI.
IQBStringType 40 chars 1.1  

Phone4

Alternate phone number, fax number, or other contact information for this person or entity. This maps to Alt. Contact in the QBPOS UI.
IQBStringType 40 chars 1.1  

PostalCode

The postal code used in the address.
IQBStringType 13 chars    

Salutation

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

State

The state name in the address.
IQBStringType 21 chars    

StoreExchangeStatus

In multi store configurations, if the customer’s information has changed, this information is updated at the headquarters store. This response field indicates whether the information was successfully updated or not.
IQBENStoreExchangeStatusType      

Street

Street Address of the vendor, customer, or other addressee.
IQBStringType 41 chars    

Street2

Street Address of the vendor, customer, or other addressee.
IQBStringType 41 chars 3.0  

Terms

While not visible on the PO, any payment terms that are defined for the vendor file are carried to the PO and are available in this field in the returned PO object.
IQBStringType      

TermsDiscount

The TermsDiscount field specifies the discount percentage. A discount is applied by the vendor if payment is received on or before the number of days specified in the TermsDiscountDays field for that vendor. Terms-related discounts for vendors are created or modified in the VendorAdd/VendorMod fields TermsDiscountDays and TermsDiscount.
IQBFloatType      

TermsDiscountDays

The TermsDiscountDays field specifies the number of days after the invoice date in which payment must be received in order to obtain the discount percentage. A discount is applied by the vendor if payment is received on or before the number of days specified in the TermsDiscountDays field for that vendor. Terms-related discounts for vendors are created or modified in the VendorAdd/VendorMod fields TermsDiscountDays and TermsDiscount.
IQBIntType      

TermsNetDays

This establishes the vendor’s payment due date, which is based on the vendor’s invoice date. The due date is established by the number of days specified in this field after the invoice date. Payment must be made within this number of days.
IQBIntType      

VendorCode

The code assigned to the vendor specified for the item.
IQBStringType 3 chars    

DataExtRetList

If you specify any custom fields/private data extensions to be returned in the query request (in the OwnerIDList), then this Ret List will contain all of the data extensions that belong to each specified OwnerID. For example, if you specify an OwnerID value of 0 (custom fields), then the query will return all custom data for the returned records.
IDataExtRetList   1.2  

(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     Y

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     Y

DataExtType

b>DataExtType The type of the data extension.
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
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
<?xml version="1.0" encoding="utf-8"?>
<?qbposxml version="4.0"?>
<QBPOSXML>
        <QBPOSXMLMsgsRq onError="stopOnError">
                <VendorQueryRq metaData="ENUMTYPE" iterator="ENUMTYPE" iteratorID="UUIDTYPE">
                        <MaxReturned >INTTYPE</MaxReturned> <!-- optional -->
                        <OwnerID >GUIDTYPE</OwnerID> <!-- optional, may repeat -->
                        <ListID >IDTYPE</ListID> <!-- optional -->
                        <!-- BEGIN OR -->
                                <TimeCreatedFilter> <!-- optional -->
                                        <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual -->
                                        <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required -->
                                        <TimeCreated >DATETIMETYPE</TimeCreated> <!-- required -->
                                </TimeCreatedFilter>
                        <!-- OR -->
                                <TimeCreatedRangeFilter> <!-- optional -->
                                        <FromTimeCreated >DATETIMETYPE</FromTimeCreated> <!-- required -->
                                        <ToTimeCreated >DATETIMETYPE</ToTimeCreated> <!-- required -->
                                </TimeCreatedRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <TimeModifiedFilter> <!-- optional -->
                                        <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual -->
                                        <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required -->
                                        <TimeModified >DATETIMETYPE</TimeModified> <!-- required -->
                                </TimeModifiedFilter>
                        <!-- OR -->
                                <TimeModifiedRangeFilter> <!-- optional -->
                                        <FromTimeModified >DATETIMETYPE</FromTimeModified> <!-- required -->
                                        <ToTimeModified >DATETIMETYPE</ToTimeModified> <!-- required -->
                                </TimeModifiedRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <AccountNumberFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <AccountNumber >STRTYPE</AccountNumber> <!-- required -->
                                </AccountNumberFilter>
                        <!-- OR -->
                                <AccountNumberRangeFilter> <!-- optional -->
                                        <FromAccountNumber >STRTYPE</FromAccountNumber> <!-- required -->
                                        <ToAccountNumber >STRTYPE</ToAccountNumber> <!-- required -->
                                </AccountNumberRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <CityFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <City >STRTYPE</City> <!-- required -->
                                </CityFilter>
                        <!-- OR -->
                                <CityRangeFilter> <!-- optional -->
                                        <FromCity >STRTYPE</FromCity> <!-- required -->
                                        <ToCity >STRTYPE</ToCity> <!-- required -->
                                </CityRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <CompanyNameFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <CompanyName >STRTYPE</CompanyName> <!-- required -->
                                </CompanyNameFilter>
                        <!-- OR -->
                                <CompanyNameRangeFilter> <!-- optional -->
                                        <FromCompanyName >STRTYPE</FromCompanyName> <!-- required -->
                                        <ToCompanyName >STRTYPE</ToCompanyName> <!-- required -->
                                </CompanyNameRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <CountryFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <Country >STRTYPE</Country> <!-- required -->
                                </CountryFilter>
                        <!-- OR -->
                                <CountryRangeFilter> <!-- optional -->
                                        <FromCountry >STRTYPE</FromCountry> <!-- required -->
                                        <ToCountry >STRTYPE</ToCountry> <!-- required -->
                                </CountryRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <EMailFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <EMail >STRTYPE</EMail> <!-- required -->
                                </EMailFilter>
                        <!-- OR -->
                                <EMailRangeFilter> <!-- optional -->
                                        <FromEMail >STRTYPE</FromEMail> <!-- required -->
                                        <ToEMail >STRTYPE</ToEMail> <!-- required -->
                                </EMailRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <FirstNameFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <FirstName >STRTYPE</FirstName> <!-- required -->
                                </FirstNameFilter>
                        <!-- OR -->
                                <FirstNameRangeFilter> <!-- optional -->
                                        <FromFirstName >STRTYPE</FromFirstName> <!-- required -->
                                        <ToFirstName >STRTYPE</ToFirstName> <!-- required -->
                                </FirstNameRangeFilter>
                        <!-- END OR -->
                        <IsInactive >BOOLTYPE</IsInactive> <!-- optional -->
                        <!-- BEGIN OR -->
                                <LastNameFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <LastName >STRTYPE</LastName> <!-- required -->
                                </LastNameFilter>
                        <!-- OR -->
                                <LastNameRangeFilter> <!-- optional -->
                                        <FromLastName >STRTYPE</FromLastName> <!-- required -->
                                        <ToLastName >STRTYPE</ToLastName> <!-- required -->
                                </LastNameRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <NotesFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <Notes >STRTYPE</Notes> <!-- required -->
                                </NotesFilter>
                        <!-- OR -->
                                <NotesRangeFilter> <!-- optional -->
                                        <FromNotes >STRTYPE</FromNotes> <!-- required -->
                                        <ToNotes >STRTYPE</ToNotes> <!-- required -->
                                </NotesRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <PhoneFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <Phone >STRTYPE</Phone> <!-- required -->
                                </PhoneFilter>
                        <!-- OR -->
                                <PhoneRangeFilter> <!-- optional -->
                                        <FromPhone >STRTYPE</FromPhone> <!-- required -->
                                        <ToPhone >STRTYPE</ToPhone> <!-- required -->
                                </PhoneRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <Phone2Filter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <Phone2 >STRTYPE</Phone2> <!-- required -->
                                </Phone2Filter>
                        <!-- OR -->
                                <Phone2RangeFilter> <!-- optional -->
                                        <FromPhone2 >STRTYPE</FromPhone2> <!-- required -->
                                        <ToPhone2 >STRTYPE</ToPhone2> <!-- required -->
                                </Phone2RangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <Phone3Filter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <Phone3 >STRTYPE</Phone3> <!-- required -->
                                </Phone3Filter>
                        <!-- OR -->
                                <Phone3RangeFilter> <!-- optional -->
                                        <FromPhone3 >STRTYPE</FromPhone3> <!-- required -->
                                        <ToPhone3 >STRTYPE</ToPhone3> <!-- required -->
                                </Phone3RangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <Phone4Filter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <Phone4 >STRTYPE</Phone4> <!-- required -->
                                </Phone4Filter>
                        <!-- OR -->
                                <Phone4RangeFilter> <!-- optional -->
                                        <FromPhone4 >STRTYPE</FromPhone4> <!-- required -->
                                        <ToPhone4 >STRTYPE</ToPhone4> <!-- required -->
                                </Phone4RangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <PostalCodeFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <PostalCode >STRTYPE</PostalCode> <!-- required -->
                                </PostalCodeFilter>
                        <!-- OR -->
                                <PostalCodeRangeFilter> <!-- optional -->
                                        <FromPostalCode >STRTYPE</FromPostalCode> <!-- required -->
                                        <ToPostalCode >STRTYPE</ToPostalCode> <!-- required -->
                                </PostalCodeRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <SalutationFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <Salutation >STRTYPE</Salutation> <!-- required -->
                                </SalutationFilter>
                        <!-- OR -->
                                <SalutationRangeFilter> <!-- optional -->
                                        <FromSalutation >STRTYPE</FromSalutation> <!-- required -->
                                        <ToSalutation >STRTYPE</ToSalutation> <!-- required -->
                                </SalutationRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <StateFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <State >STRTYPE</State> <!-- required -->
                                </StateFilter>
                        <!-- OR -->
                                <StateRangeFilter> <!-- optional -->
                                        <FromState >STRTYPE</FromState> <!-- required -->
                                        <ToState >STRTYPE</ToState> <!-- required -->
                                </StateRangeFilter>
                        <!-- END OR -->
                        <!-- StoreExchangeStatus may have one of the following values: Modified, Sent, Acknowledged -->
                        <StoreExchangeStatus >ENUMTYPE</StoreExchangeStatus> <!-- optional -->
                        <!-- BEGIN OR -->
                                <StreetFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <Street >STRTYPE</Street> <!-- required -->
                                </StreetFilter>
                        <!-- OR -->
                                <StreetRangeFilter> <!-- optional -->
                                        <FromStreet >STRTYPE</FromStreet> <!-- required -->
                                        <ToStreet >STRTYPE</ToStreet> <!-- required -->
                                </StreetRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <Street2Filter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <Street2 >STRTYPE</Street2> <!-- required -->
                                </Street2Filter>
                        <!-- OR -->
                                <Street2RangeFilter> <!-- optional -->
                                        <FromStreet2 >STRTYPE</FromStreet2> <!-- required -->
                                        <ToStreet2 >STRTYPE</ToStreet2> <!-- required -->
                                </Street2RangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <TermsDiscountFilter> <!-- optional -->
                                        <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual -->
                                        <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required -->
                                        <TermsDiscount >FLOATTYPE</TermsDiscount> <!-- required -->
                                </TermsDiscountFilter>
                        <!-- OR -->
                                <TermsDiscountRangeFilter> <!-- optional -->
                                        <FromTermsDiscount >FLOATTYPE</FromTermsDiscount> <!-- required -->
                                        <ToTermsDiscount >FLOATTYPE</ToTermsDiscount> <!-- required -->
                                </TermsDiscountRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <TermsDiscountDaysFilter> <!-- optional -->
                                        <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual -->
                                        <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required -->
                                        <TermsDiscountDays >INTTYPE</TermsDiscountDays> <!-- required -->
                                </TermsDiscountDaysFilter>
                        <!-- OR -->
                                <TermsDiscountDaysRangeFilter> <!-- optional -->
                                        <FromTermsDiscountDays >INTTYPE</FromTermsDiscountDays> <!-- required -->
                                        <ToTermsDiscountDays >INTTYPE</ToTermsDiscountDays> <!-- required -->
                                </TermsDiscountDaysRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <TermsNetDaysFilter> <!-- optional -->
                                        <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual -->
                                        <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required -->
                                        <TermsNetDays >INTTYPE</TermsNetDays> <!-- required -->
                                </TermsNetDaysFilter>
                        <!-- OR -->
                                <TermsNetDaysRangeFilter> <!-- optional -->
                                        <FromTermsNetDays >INTTYPE</FromTermsNetDays> <!-- required -->
                                        <ToTermsNetDays >INTTYPE</ToTermsNetDays> <!-- required -->
                                </TermsNetDaysRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <VendorCodeFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <VendorCode >STRTYPE</VendorCode> <!-- required -->
                                </VendorCodeFilter>
                        <!-- OR -->
                                <VendorCodeRangeFilter> <!-- optional -->
                                        <FromVendorCode >STRTYPE</FromVendorCode> <!-- required -->
                                        <ToVendorCode >STRTYPE</ToVendorCode> <!-- required -->
                                </VendorCodeRangeFilter>
                        <!-- END OR -->
                        <IncludeRetElement >STRTYPE</IncludeRetElement> <!-- optional, may repeat -->
                </VendorQueryRq>

                <VendorQueryRs statusCode="INTTYPE" statusSeverity="STRTYPE" statusMessage="STRTYPE" retCount="INTTYPE" iteratorRemainingCount="INTTYPE" iteratorID="UUIDTYPE">
                        <VendorRet> <!-- optional, may repeat -->
                                <ListID >IDTYPE</ListID> <!-- optional -->
                                <TimeCreated >DATETIMETYPE</TimeCreated> <!-- optional -->
                                <TimeModified >DATETIMETYPE</TimeModified> <!-- optional -->
                                <AccountNumber >STRTYPE</AccountNumber> <!-- optional -->
                                <City >STRTYPE</City> <!-- optional -->
                                <CompanyName >STRTYPE</CompanyName> <!-- optional -->
                                <Country >STRTYPE</Country> <!-- optional -->
                                <EMail >STRTYPE</EMail> <!-- optional -->
                                <FirstName >STRTYPE</FirstName> <!-- optional -->
                                <IsInactive >BOOLTYPE</IsInactive> <!-- optional -->
                                <LastName >STRTYPE</LastName> <!-- optional -->
                                <Notes >STRTYPE</Notes> <!-- optional -->
                                <Phone >STRTYPE</Phone> <!-- optional -->
                                <Phone2 >STRTYPE</Phone2> <!-- optional -->
                                <Phone3 >STRTYPE</Phone3> <!-- optional -->
                                <Phone4 >STRTYPE</Phone4> <!-- optional -->
                                <PostalCode >STRTYPE</PostalCode> <!-- optional -->
                                <Salutation >STRTYPE</Salutation> <!-- optional -->
                                <State >STRTYPE</State> <!-- optional -->
                                <!-- StoreExchangeStatus may have one of the following values: Modified, Sent, Acknowledged -->
                                <StoreExchangeStatus >ENUMTYPE</StoreExchangeStatus> <!-- optional -->
                                <Street >STRTYPE</Street> <!-- optional -->
                                <Street2 >STRTYPE</Street2> <!-- optional -->
                                <Terms >STRTYPE</Terms> <!-- optional -->
                                <TermsDiscount >FLOATTYPE</TermsDiscount> <!-- optional -->
                                <TermsDiscountDays >INTTYPE</TermsDiscountDays> <!-- optional -->
                                <TermsNetDays >INTTYPE</TermsNetDays> <!-- optional -->
                                <VendorCode >STRTYPE</VendorCode> <!-- optional -->
                                <DataExtRet> <!-- optional, may repeat -->
                                        <OwnerID >GUIDTYPE</OwnerID> <!-- required -->
                                        <DataExtName >STRTYPE</DataExtName> <!-- required -->
                                        <!-- DataExtType may have one of the following values: INTTYPE, AMTTYPE, PRICETYPE, QUANTYPE, PERCENTTYPE, DATETIMETYPE, STR255TYPE, STR1024TYPE -->
                                        <DataExtType >ENUMTYPE</DataExtType> <!-- required -->
                                        <DataExtValue >STRTYPE</DataExtValue> <!-- required -->
                                </DataExtRet>
                        </VendorRet>
                </VendorQueryRs>
        </QBPOSXMLMsgsRq>
</QBPOSXML>

  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
'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.qbposfc4

        Public Class SampleVendorQuery
                Public Sub  DoVendorQuery()
                        Dim sessionBegun as Boolean
                        sessionBegun = False
                        Dim connectionOpen as Boolean
                        connectionOpen = False
                        Dim sessionManager as QBPOSSessionManager
                        sessionManager = nothing

                        Try
                                'Create the session Manager object
                                sessionManager = new QBPOSSessionManager

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

                                BuildVendorQueryRq(requestMsgSet)

                                'Connect to QuickBooks and begin a session
                                sessionManager.OpenConnection("","Sample Code from OSR")
                                connectionOpen = True
                                sessionManager.BeginSession("")
                                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

                                WalkVendorQueryRs(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 BuildVendorQueryRq(requestMsgSet as IMsgSetRequest)
                        Dim VendorQueryRq as IVendorQuery
                        VendorQueryRq= requestMsgSet.AppendVendorQueryRq()
                        'Set field value for MaxReturned
                        VendorQueryRq.MaxReturned.SetValue(6)
                        'Set field value for OwnerIDList
                        'May create more than one of these if needed
                        VendorQueryRq.OwnerIDList.Add(System.Guid.NewGuid().ToString())
                        'Set field value for ListID
                        VendorQueryRq.ListID.SetValue("200000-1011023419")
                        Dim ORTimeCreatedFiltersElementType4625 as String
                        ORTimeCreatedFiltersElementType4625 = "TimeCreatedFilter"
                        if (ORTimeCreatedFiltersElementType4625 = "TimeCreatedFilter") then
                                'Set field value for MatchNumericCriterion
                                VendorQueryRq.ORTimeCreatedFilters.TimeCreatedFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
                                'Set field value for TimeCreated
                                VendorQueryRq.ORTimeCreatedFilters.TimeCreatedFilter.TimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
                        End If
                        if (ORTimeCreatedFiltersElementType4625 = "TimeCreatedRangeFilter") then
                                'Set field value for FromTimeCreated
                                VendorQueryRq.ORTimeCreatedFilters.TimeCreatedRangeFilter.FromTimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
                                'Set field value for ToTimeCreated
                                VendorQueryRq.ORTimeCreatedFilters.TimeCreatedRangeFilter.ToTimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
                        End If
                        Dim ORTimeModifiedFiltersElementType4626 as String
                        ORTimeModifiedFiltersElementType4626 = "TimeModifiedFilter"
                        if (ORTimeModifiedFiltersElementType4626 = "TimeModifiedFilter") then
                                'Set field value for MatchNumericCriterion
                                VendorQueryRq.ORTimeModifiedFilters.TimeModifiedFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
                                'Set field value for TimeModified
                                VendorQueryRq.ORTimeModifiedFilters.TimeModifiedFilter.TimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
                        End If
                        if (ORTimeModifiedFiltersElementType4626 = "TimeModifiedRangeFilter") then
                                'Set field value for FromTimeModified
                                VendorQueryRq.ORTimeModifiedFilters.TimeModifiedRangeFilter.FromTimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
                                'Set field value for ToTimeModified
                                VendorQueryRq.ORTimeModifiedFilters.TimeModifiedRangeFilter.ToTimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
                        End If
                        Dim ORAccountNumberFiltersElementType4627 as String
                        ORAccountNumberFiltersElementType4627 = "AccountNumberFilter"
                        if (ORAccountNumberFiltersElementType4627 = "AccountNumberFilter") then
                                'Set field value for MatchStringCriterion
                                VendorQueryRq.ORAccountNumberFilters.AccountNumberFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for AccountNumber
                                VendorQueryRq.ORAccountNumberFilters.AccountNumberFilter.AccountNumber.SetValue("ab")
                        End If
                        if (ORAccountNumberFiltersElementType4627 = "AccountNumberRangeFilter") then
                                'Set field value for FromAccountNumber
                                VendorQueryRq.ORAccountNumberFilters.AccountNumberRangeFilter.FromAccountNumber.SetValue("ab")
                                'Set field value for ToAccountNumber
                                VendorQueryRq.ORAccountNumberFilters.AccountNumberRangeFilter.ToAccountNumber.SetValue("ab")
                        End If
                        Dim ORCityFiltersElementType4628 as String
                        ORCityFiltersElementType4628 = "CityFilter"
                        if (ORCityFiltersElementType4628 = "CityFilter") then
                                'Set field value for MatchStringCriterion
                                VendorQueryRq.ORCityFilters.CityFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for City
                                VendorQueryRq.ORCityFilters.CityFilter.City.SetValue("ab")
                        End If
                        if (ORCityFiltersElementType4628 = "CityRangeFilter") then
                                'Set field value for FromCity
                                VendorQueryRq.ORCityFilters.CityRangeFilter.FromCity.SetValue("ab")
                                'Set field value for ToCity
                                VendorQueryRq.ORCityFilters.CityRangeFilter.ToCity.SetValue("ab")
                        End If
                        Dim ORCompanyNameFiltersElementType4629 as String
                        ORCompanyNameFiltersElementType4629 = "CompanyNameFilter"
                        if (ORCompanyNameFiltersElementType4629 = "CompanyNameFilter") then
                                'Set field value for MatchStringCriterion
                                VendorQueryRq.ORCompanyNameFilters.CompanyNameFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for CompanyName
                                VendorQueryRq.ORCompanyNameFilters.CompanyNameFilter.CompanyName.SetValue("ab")
                        End If
                        if (ORCompanyNameFiltersElementType4629 = "CompanyNameRangeFilter") then
                                'Set field value for FromCompanyName
                                VendorQueryRq.ORCompanyNameFilters.CompanyNameRangeFilter.FromCompanyName.SetValue("ab")
                                'Set field value for ToCompanyName
                                VendorQueryRq.ORCompanyNameFilters.CompanyNameRangeFilter.ToCompanyName.SetValue("ab")
                        End If
                        Dim ORCountryFiltersElementType4630 as String
                        ORCountryFiltersElementType4630 = "CountryFilter"
                        if (ORCountryFiltersElementType4630 = "CountryFilter") then
                                'Set field value for MatchStringCriterion
                                VendorQueryRq.ORCountryFilters.CountryFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for Country
                                VendorQueryRq.ORCountryFilters.CountryFilter.Country.SetValue("ab")
                        End If
                        if (ORCountryFiltersElementType4630 = "CountryRangeFilter") then
                                'Set field value for FromCountry
                                VendorQueryRq.ORCountryFilters.CountryRangeFilter.FromCountry.SetValue("ab")
                                'Set field value for ToCountry
                                VendorQueryRq.ORCountryFilters.CountryRangeFilter.ToCountry.SetValue("ab")
                        End If
                        Dim OREMailFiltersElementType4631 as String
                        OREMailFiltersElementType4631 = "EMailFilter"
                        if (OREMailFiltersElementType4631 = "EMailFilter") then
                                'Set field value for MatchStringCriterion
                                VendorQueryRq.OREMailFilters.EMailFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for EMail
                                VendorQueryRq.OREMailFilters.EMailFilter.EMail.SetValue("ab")
                        End If
                        if (OREMailFiltersElementType4631 = "EMailRangeFilter") then
                                'Set field value for FromEMail
                                VendorQueryRq.OREMailFilters.EMailRangeFilter.FromEMail.SetValue("ab")
                                'Set field value for ToEMail
                                VendorQueryRq.OREMailFilters.EMailRangeFilter.ToEMail.SetValue("ab")
                        End If
                        Dim ORFirstNameFiltersElementType4632 as String
                        ORFirstNameFiltersElementType4632 = "FirstNameFilter"
                        if (ORFirstNameFiltersElementType4632 = "FirstNameFilter") then
                                'Set field value for MatchStringCriterion
                                VendorQueryRq.ORFirstNameFilters.FirstNameFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for FirstName
                                VendorQueryRq.ORFirstNameFilters.FirstNameFilter.FirstName.SetValue("ab")
                        End If
                        if (ORFirstNameFiltersElementType4632 = "FirstNameRangeFilter") then
                                'Set field value for FromFirstName
                                VendorQueryRq.ORFirstNameFilters.FirstNameRangeFilter.FromFirstName.SetValue("ab")
                                'Set field value for ToFirstName
                                VendorQueryRq.ORFirstNameFilters.FirstNameRangeFilter.ToFirstName.SetValue("ab")
                        End If
                        'Set field value for IsInactive
                        VendorQueryRq.IsInactive.SetValue(True)
                        Dim ORLastNameFiltersElementType4633 as String
                        ORLastNameFiltersElementType4633 = "LastNameFilter"
                        if (ORLastNameFiltersElementType4633 = "LastNameFilter") then
                                'Set field value for MatchStringCriterion
                                VendorQueryRq.ORLastNameFilters.LastNameFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for LastName
                                VendorQueryRq.ORLastNameFilters.LastNameFilter.LastName.SetValue("ab")
                        End If
                        if (ORLastNameFiltersElementType4633 = "LastNameRangeFilter") then
                                'Set field value for FromLastName
                                VendorQueryRq.ORLastNameFilters.LastNameRangeFilter.FromLastName.SetValue("ab")
                                'Set field value for ToLastName
                                VendorQueryRq.ORLastNameFilters.LastNameRangeFilter.ToLastName.SetValue("ab")
                        End If
                        Dim ORNotesFiltersElementType4634 as String
                        ORNotesFiltersElementType4634 = "NotesFilter"
                        if (ORNotesFiltersElementType4634 = "NotesFilter") then
                                'Set field value for MatchStringCriterion
                                VendorQueryRq.ORNotesFilters.NotesFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for Notes
                                VendorQueryRq.ORNotesFilters.NotesFilter.Notes.SetValue("ab")
                        End If
                        if (ORNotesFiltersElementType4634 = "NotesRangeFilter") then
                                'Set field value for FromNotes
                                VendorQueryRq.ORNotesFilters.NotesRangeFilter.FromNotes.SetValue("ab")
                                'Set field value for ToNotes
                                VendorQueryRq.ORNotesFilters.NotesRangeFilter.ToNotes.SetValue("ab")
                        End If
                        Dim ORPhoneFiltersElementType4635 as String
                        ORPhoneFiltersElementType4635 = "PhoneFilter"
                        if (ORPhoneFiltersElementType4635 = "PhoneFilter") then
                                'Set field value for MatchStringCriterion
                                VendorQueryRq.ORPhoneFilters.PhoneFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for Phone
                                VendorQueryRq.ORPhoneFilters.PhoneFilter.Phone.SetValue("ab")
                        End If
                        if (ORPhoneFiltersElementType4635 = "PhoneRangeFilter") then
                                'Set field value for FromPhone
                                VendorQueryRq.ORPhoneFilters.PhoneRangeFilter.FromPhone.SetValue("ab")
                                'Set field value for ToPhone
                                VendorQueryRq.ORPhoneFilters.PhoneRangeFilter.ToPhone.SetValue("ab")
                        End If
                        Dim ORPhone2FiltersElementType4636 as String
                        ORPhone2FiltersElementType4636 = "Phone2Filter"
                        if (ORPhone2FiltersElementType4636 = "Phone2Filter") then
                                'Set field value for MatchStringCriterion
                                VendorQueryRq.ORPhone2Filters.Phone2Filter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for Phone2
                                VendorQueryRq.ORPhone2Filters.Phone2Filter.Phone2.SetValue("ab")
                        End If
                        if (ORPhone2FiltersElementType4636 = "Phone2RangeFilter") then
                                'Set field value for FromPhone2
                                VendorQueryRq.ORPhone2Filters.Phone2RangeFilter.FromPhone2.SetValue("ab")
                                'Set field value for ToPhone2
                                VendorQueryRq.ORPhone2Filters.Phone2RangeFilter.ToPhone2.SetValue("ab")
                        End If
                        Dim ORPhone3FiltersElementType4637 as String
                        ORPhone3FiltersElementType4637 = "Phone3Filter"
                        if (ORPhone3FiltersElementType4637 = "Phone3Filter") then
                                'Set field value for MatchStringCriterion
                                VendorQueryRq.ORPhone3Filters.Phone3Filter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for Phone3
                                VendorQueryRq.ORPhone3Filters.Phone3Filter.Phone3.SetValue("ab")
                        End If
                        if (ORPhone3FiltersElementType4637 = "Phone3RangeFilter") then
                                'Set field value for FromPhone3
                                VendorQueryRq.ORPhone3Filters.Phone3RangeFilter.FromPhone3.SetValue("ab")
                                'Set field value for ToPhone3
                                VendorQueryRq.ORPhone3Filters.Phone3RangeFilter.ToPhone3.SetValue("ab")
                        End If
                        Dim ORPhone4FiltersElementType4638 as String
                        ORPhone4FiltersElementType4638 = "Phone4Filter"
                        if (ORPhone4FiltersElementType4638 = "Phone4Filter") then
                                'Set field value for MatchStringCriterion
                                VendorQueryRq.ORPhone4Filters.Phone4Filter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for Phone4
                                VendorQueryRq.ORPhone4Filters.Phone4Filter.Phone4.SetValue("ab")
                        End If
                        if (ORPhone4FiltersElementType4638 = "Phone4RangeFilter") then
                                'Set field value for FromPhone4
                                VendorQueryRq.ORPhone4Filters.Phone4RangeFilter.FromPhone4.SetValue("ab")
                                'Set field value for ToPhone4
                                VendorQueryRq.ORPhone4Filters.Phone4RangeFilter.ToPhone4.SetValue("ab")
                        End If
                        Dim ORPostalCodeFiltersElementType4639 as String
                        ORPostalCodeFiltersElementType4639 = "PostalCodeFilter"
                        if (ORPostalCodeFiltersElementType4639 = "PostalCodeFilter") then
                                'Set field value for MatchStringCriterion
                                VendorQueryRq.ORPostalCodeFilters.PostalCodeFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for PostalCode
                                VendorQueryRq.ORPostalCodeFilters.PostalCodeFilter.PostalCode.SetValue("ab")
                        End If
                        if (ORPostalCodeFiltersElementType4639 = "PostalCodeRangeFilter") then
                                'Set field value for FromPostalCode
                                VendorQueryRq.ORPostalCodeFilters.PostalCodeRangeFilter.FromPostalCode.SetValue("ab")
                                'Set field value for ToPostalCode
                                VendorQueryRq.ORPostalCodeFilters.PostalCodeRangeFilter.ToPostalCode.SetValue("ab")
                        End If
                        Dim ORSalutationFiltersElementType4640 as String
                        ORSalutationFiltersElementType4640 = "SalutationFilter"
                        if (ORSalutationFiltersElementType4640 = "SalutationFilter") then
                                'Set field value for MatchStringCriterion
                                VendorQueryRq.ORSalutationFilters.SalutationFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for Salutation
                                VendorQueryRq.ORSalutationFilters.SalutationFilter.Salutation.SetValue("ab")
                        End If
                        if (ORSalutationFiltersElementType4640 = "SalutationRangeFilter") then
                                'Set field value for FromSalutation
                                VendorQueryRq.ORSalutationFilters.SalutationRangeFilter.FromSalutation.SetValue("ab")
                                'Set field value for ToSalutation
                                VendorQueryRq.ORSalutationFilters.SalutationRangeFilter.ToSalutation.SetValue("ab")
                        End If
                        Dim ORStateFiltersElementType4641 as String
                        ORStateFiltersElementType4641 = "StateFilter"
                        if (ORStateFiltersElementType4641 = "StateFilter") then
                                'Set field value for MatchStringCriterion
                                VendorQueryRq.ORStateFilters.StateFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for State
                                VendorQueryRq.ORStateFilters.StateFilter.State.SetValue("ab")
                        End If
                        if (ORStateFiltersElementType4641 = "StateRangeFilter") then
                                'Set field value for FromState
                                VendorQueryRq.ORStateFilters.StateRangeFilter.FromState.SetValue("ab")
                                'Set field value for ToState
                                VendorQueryRq.ORStateFilters.StateRangeFilter.ToState.SetValue("ab")
                        End If
                        'Set field value for StoreExchangeStatus
                        VendorQueryRq.StoreExchangeStatus.SetValue(ENStoreExchangeStatus.sesModified)
                        Dim ORStreetFiltersElementType4642 as String
                        ORStreetFiltersElementType4642 = "StreetFilter"
                        if (ORStreetFiltersElementType4642 = "StreetFilter") then
                                'Set field value for MatchStringCriterion
                                VendorQueryRq.ORStreetFilters.StreetFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for Street
                                VendorQueryRq.ORStreetFilters.StreetFilter.Street.SetValue("ab")
                        End If
                        if (ORStreetFiltersElementType4642 = "StreetRangeFilter") then
                                'Set field value for FromStreet
                                VendorQueryRq.ORStreetFilters.StreetRangeFilter.FromStreet.SetValue("ab")
                                'Set field value for ToStreet
                                VendorQueryRq.ORStreetFilters.StreetRangeFilter.ToStreet.SetValue("ab")
                        End If
                        Dim ORStreet2FiltersElementType4643 as String
                        ORStreet2FiltersElementType4643 = "Street2Filter"
                        if (ORStreet2FiltersElementType4643 = "Street2Filter") then
                                'Set field value for MatchStringCriterion
                                VendorQueryRq.ORStreet2Filters.Street2Filter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for Street2
                                VendorQueryRq.ORStreet2Filters.Street2Filter.Street2.SetValue("ab")
                        End If
                        if (ORStreet2FiltersElementType4643 = "Street2RangeFilter") then
                                'Set field value for FromStreet2
                                VendorQueryRq.ORStreet2Filters.Street2RangeFilter.FromStreet2.SetValue("ab")
                                'Set field value for ToStreet2
                                VendorQueryRq.ORStreet2Filters.Street2RangeFilter.ToStreet2.SetValue("ab")
                        End If
                        Dim ORTermsDiscountFiltersElementType4644 as String
                        ORTermsDiscountFiltersElementType4644 = "TermsDiscountFilter"
                        if (ORTermsDiscountFiltersElementType4644 = "TermsDiscountFilter") then
                                'Set field value for MatchNumericCriterion
                                VendorQueryRq.ORTermsDiscountFilters.TermsDiscountFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
                                'Set field value for TermsDiscount
                                VendorQueryRq.ORTermsDiscountFilters.TermsDiscountFilter.TermsDiscount.SetValue(12.34)
                        End If
                        if (ORTermsDiscountFiltersElementType4644 = "TermsDiscountRangeFilter") then
                                'Set field value for FromTermsDiscount
                                VendorQueryRq.ORTermsDiscountFilters.TermsDiscountRangeFilter.FromTermsDiscount.SetValue(12.34)
                                'Set field value for ToTermsDiscount
                                VendorQueryRq.ORTermsDiscountFilters.TermsDiscountRangeFilter.ToTermsDiscount.SetValue(12.34)
                        End If
                        Dim ORTermsDiscountDaysFiltersElementType4645 as String
                        ORTermsDiscountDaysFiltersElementType4645 = "TermsDiscountDaysFilter"
                        if (ORTermsDiscountDaysFiltersElementType4645 = "TermsDiscountDaysFilter") then
                                'Set field value for MatchNumericCriterion
                                VendorQueryRq.ORTermsDiscountDaysFilters.TermsDiscountDaysFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
                                'Set field value for TermsDiscountDays
                                VendorQueryRq.ORTermsDiscountDaysFilters.TermsDiscountDaysFilter.TermsDiscountDays.SetValue(6)
                        End If
                        if (ORTermsDiscountDaysFiltersElementType4645 = "TermsDiscountDaysRangeFilter") then
                                'Set field value for FromTermsDiscountDays
                                VendorQueryRq.ORTermsDiscountDaysFilters.TermsDiscountDaysRangeFilter.FromTermsDiscountDays.SetValue(6)
                                'Set field value for ToTermsDiscountDays
                                VendorQueryRq.ORTermsDiscountDaysFilters.TermsDiscountDaysRangeFilter.ToTermsDiscountDays.SetValue(6)
                        End If
                        Dim ORTermsNetDaysFiltersElementType4646 as String
                        ORTermsNetDaysFiltersElementType4646 = "TermsNetDaysFilter"
                        if (ORTermsNetDaysFiltersElementType4646 = "TermsNetDaysFilter") then
                                'Set field value for MatchNumericCriterion
                                VendorQueryRq.ORTermsNetDaysFilters.TermsNetDaysFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
                                'Set field value for TermsNetDays
                                VendorQueryRq.ORTermsNetDaysFilters.TermsNetDaysFilter.TermsNetDays.SetValue(6)
                        End If
                        if (ORTermsNetDaysFiltersElementType4646 = "TermsNetDaysRangeFilter") then
                                'Set field value for FromTermsNetDays
                                VendorQueryRq.ORTermsNetDaysFilters.TermsNetDaysRangeFilter.FromTermsNetDays.SetValue(6)
                                'Set field value for ToTermsNetDays
                                VendorQueryRq.ORTermsNetDaysFilters.TermsNetDaysRangeFilter.ToTermsNetDays.SetValue(6)
                        End If
                        Dim ORVendorCodeFiltersElementType4647 as String
                        ORVendorCodeFiltersElementType4647 = "VendorCodeFilter"
                        if (ORVendorCodeFiltersElementType4647 = "VendorCodeFilter") then
                                'Set field value for MatchStringCriterion
                                VendorQueryRq.ORVendorCodeFilters.VendorCodeFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for VendorCode
                                VendorQueryRq.ORVendorCodeFilters.VendorCodeFilter.VendorCode.SetValue("ab")
                        End If
                        if (ORVendorCodeFiltersElementType4647 = "VendorCodeRangeFilter") then
                                'Set field value for FromVendorCode
                                VendorQueryRq.ORVendorCodeFilters.VendorCodeRangeFilter.FromVendorCode.SetValue("ab")
                                'Set field value for ToVendorCode
                                VendorQueryRq.ORVendorCodeFilters.VendorCodeRangeFilter.ToVendorCode.SetValue("ab")
                        End If
                        'Set field value for IncludeRetElementList
                        'May create more than one of these if needed
                        VendorQueryRq.IncludeRetElementList.Add("ab")
                End Sub




                Public Sub WalkVendorQueryRs( 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.rtVendorQueryRs) then
                                                        'upcast to more specific type here, this is safe because we checked with response.Type check above
                                                        Dim VendorRet as IVendorRetList
                                                        VendorRet = CType(response.Detail,IVendorRetList)
                                                        for z=0 to VendorRet.Count-1
                                                                WalkVendorRet(VendorRet.GetAt(z))
                                                        Next z
                                                End If
                                        End If
                                End If
                        Next j
                End Sub




                Public Sub WalkVendorRet(VendorRet as IVendorRet)
                        if (VendorRet is nothing) then
                                Exit Sub
                        End If

                        'Go through all the elements of IVendorRetList
                        'Get value of ListID
                        if ( not VendorRet.ListID is nothing) then
                                Dim ListID4648 as String
                                ListID4648 = VendorRet.ListID.GetValue()
                        End If
                        'Get value of TimeCreated
                        if ( not VendorRet.TimeCreated is nothing) then
                                Dim TimeCreated4649 as DateTime
                                TimeCreated4649 = VendorRet.TimeCreated.GetValue()
                        End If
                        'Get value of TimeModified
                        if ( not VendorRet.TimeModified is nothing) then
                                Dim TimeModified4650 as DateTime
                                TimeModified4650 = VendorRet.TimeModified.GetValue()
                        End If
                        'Get value of AccountNumber
                        if ( not VendorRet.AccountNumber is nothing) then
                                Dim AccountNumber4651 as String
                                AccountNumber4651 = VendorRet.AccountNumber.GetValue()
                        End If
                        'Get value of City
                        if ( not VendorRet.City is nothing) then
                                Dim City4652 as String
                                City4652 = VendorRet.City.GetValue()
                        End If
                        'Get value of CompanyName
                        if ( not VendorRet.CompanyName is nothing) then
                                Dim CompanyName4653 as String
                                CompanyName4653 = VendorRet.CompanyName.GetValue()
                        End If
                        'Get value of Country
                        if ( not VendorRet.Country is nothing) then
                                Dim Country4654 as String
                                Country4654 = VendorRet.Country.GetValue()
                        End If
                        'Get value of EMail
                        if ( not VendorRet.EMail is nothing) then
                                Dim EMail4655 as String
                                EMail4655 = VendorRet.EMail.GetValue()
                        End If
                        'Get value of FirstName
                        if ( not VendorRet.FirstName is nothing) then
                                Dim FirstName4656 as String
                                FirstName4656 = VendorRet.FirstName.GetValue()
                        End If
                        'Get value of IsInactive
                        if ( not VendorRet.IsInactive is nothing) then
                                Dim IsInactive4657 as Boolean
                                IsInactive4657 = VendorRet.IsInactive.GetValue()
                        End If
                        'Get value of LastName
                        if ( not VendorRet.LastName is nothing) then
                                Dim LastName4658 as String
                                LastName4658 = VendorRet.LastName.GetValue()
                        End If
                        'Get value of Notes
                        if ( not VendorRet.Notes is nothing) then
                                Dim Notes4659 as String
                                Notes4659 = VendorRet.Notes.GetValue()
                        End If
                        'Get value of Phone
                        if ( not VendorRet.Phone is nothing) then
                                Dim Phone4660 as String
                                Phone4660 = VendorRet.Phone.GetValue()
                        End If
                        'Get value of Phone2
                        if ( not VendorRet.Phone2 is nothing) then
                                Dim Phone24661 as String
                                Phone24661 = VendorRet.Phone2.GetValue()
                        End If
                        'Get value of Phone3
                        if ( not VendorRet.Phone3 is nothing) then
                                Dim Phone34662 as String
                                Phone34662 = VendorRet.Phone3.GetValue()
                        End If
                        'Get value of Phone4
                        if ( not VendorRet.Phone4 is nothing) then
                                Dim Phone44663 as String
                                Phone44663 = VendorRet.Phone4.GetValue()
                        End If
                        'Get value of PostalCode
                        if ( not VendorRet.PostalCode is nothing) then
                                Dim PostalCode4664 as String
                                PostalCode4664 = VendorRet.PostalCode.GetValue()
                        End If
                        'Get value of Salutation
                        if ( not VendorRet.Salutation is nothing) then
                                Dim Salutation4665 as String
                                Salutation4665 = VendorRet.Salutation.GetValue()
                        End If
                        'Get value of State
                        if ( not VendorRet.State is nothing) then
                                Dim State4666 as String
                                State4666 = VendorRet.State.GetValue()
                        End If
                        'Get value of StoreExchangeStatus
                        if ( not VendorRet.StoreExchangeStatus is nothing) then
                                Dim StoreExchangeStatus4667 as ENStoreExchangeStatus
                                StoreExchangeStatus4667 = VendorRet.StoreExchangeStatus.GetValue()
                        End If
                        'Get value of Street
                        if ( not VendorRet.Street is nothing) then
                                Dim Street4668 as String
                                Street4668 = VendorRet.Street.GetValue()
                        End If
                        'Get value of Street2
                        if ( not VendorRet.Street2 is nothing) then
                                Dim Street24669 as String
                                Street24669 = VendorRet.Street2.GetValue()
                        End If
                        'Get value of Terms
                        if ( not VendorRet.Terms is nothing) then
                                Dim Terms4670 as String
                                Terms4670 = VendorRet.Terms.GetValue()
                        End If
                        'Get value of TermsDiscount
                        if ( not VendorRet.TermsDiscount is nothing) then
                                Dim TermsDiscount4671 as Single
                                TermsDiscount4671 = VendorRet.TermsDiscount.GetValue()
                        End If
                        'Get value of TermsDiscountDays
                        if ( not VendorRet.TermsDiscountDays is nothing) then
                                Dim TermsDiscountDays4672 as Integer
                                TermsDiscountDays4672 = VendorRet.TermsDiscountDays.GetValue()
                        End If
                        'Get value of TermsNetDays
                        if ( not VendorRet.TermsNetDays is nothing) then
                                Dim TermsNetDays4673 as Integer
                                TermsNetDays4673 = VendorRet.TermsNetDays.GetValue()
                        End If
                        'Get value of VendorCode
                        if ( not VendorRet.VendorCode is nothing) then
                                Dim VendorCode4674 as String
                                VendorCode4674 = VendorRet.VendorCode.GetValue()
                        End If
                        if (not VendorRet.DataExtRetList is nothing)
                                Dim i4675 as Integer
                                for i4675 = 0  to VendorRet.DataExtRetList.Count - 1
                                        Dim DataExtRet as IDataExtRet
                                        DataExtRet = VendorRet.DataExtRetList.GetAt(i4675)
                                        'Get value of OwnerID
                                        Dim OwnerID4676 as String
                                        OwnerID4676 = DataExtRet.OwnerID.GetValue()
                                        'Get value of DataExtName
                                        Dim DataExtName4677 as String
                                        DataExtName4677 = DataExtRet.DataExtName.GetValue()
                                        'Get value of DataExtType
                                        Dim DataExtType4678 as ENDataExtType
                                        DataExtType4678 = DataExtRet.DataExtType.GetValue()
                                        'Get value of DataExtValue
                                        Dim DataExtValue4679 as String
                                        DataExtValue4679 = DataExtRet.DataExtValue.GetValue()
                                Next i4675
                        End If
                End Sub




        End Class

  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
//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.qbposfc4;

namespace com.intuit.idn.samples
{
        public class SampleVendorQuery
        {
                public void  DoVendorQuery()
                {
                        bool sessionBegun = false;
                        bool connectionOpen = false;
                        QBPOSSessionManager sessionManager = null;

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

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

                                BuildVendorQueryRq(requestMsgSet);

                                //Connect to QuickBooks and begin a session
                                sessionManager.OpenConnection("","Sample Code from OSR");
                                connectionOpen = true;
                                sessionManager.BeginSession("");
                                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;

                                WalkVendorQueryRs(responseMsgSet);
                        }
                        catch (Exception e)
                        {
                                MessageBox.Show(e.Message, "Error");
                                if (sessionBegun)
                                {
                                        sessionManager.EndSession();
                                }
                                if (connectionOpen)
                                {
                                        sessionManager.CloseConnection();
                                }
                        }
                }
                void BuildVendorQueryRq(IMsgSetRequest requestMsgSet)
                {
                        IVendorQuery VendorQueryRq= requestMsgSet.AppendVendorQueryRq();
                        //Set attributes
                        //Set field value for metaData
                        VendorQueryRq.metaData.SetValue(ENmetaData.mdMetaDataAndResponseData);
                        //Set field value for iterator
                        VendorQueryRq.iterator.SetValue(ENiterator.itStart);
                        //Set field value for iteratorID
                        VendorQueryRq.iteratorID.SetValue("{D7355385-A17B-4f5d-B34D-F34C79C3E6FC}");
                        //Set field value for MaxReturned
                        VendorQueryRq.MaxReturned.SetValue(6);
                        //Set field value for OwnerIDList
                        //May create more than one of these if needed
                        VendorQueryRq.OwnerIDList.Add(Guid.NewGuid().ToString());
                        //Set field value for ListID
                        VendorQueryRq.ListID.SetValue("200000-1011023419");
                        string ORTimeCreatedFiltersElementType4680 = "TimeCreatedFilter";
                        if (ORTimeCreatedFiltersElementType4680 == "TimeCreatedFilter")
                        {
                                //Set field value for MatchNumericCriterion
                                VendorQueryRq.ORTimeCreatedFilters.TimeCreatedFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan);
                                //Set field value for TimeCreated
                                VendorQueryRq.ORTimeCreatedFilters.TimeCreatedFilter.TimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false);
                        }
                        if (ORTimeCreatedFiltersElementType4680 == "TimeCreatedRangeFilter")
                        {
                                //Set field value for FromTimeCreated
                                VendorQueryRq.ORTimeCreatedFilters.TimeCreatedRangeFilter.FromTimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false);
                                //Set field value for ToTimeCreated
                                VendorQueryRq.ORTimeCreatedFilters.TimeCreatedRangeFilter.ToTimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false);
                        }
                        string ORTimeModifiedFiltersElementType4681 = "TimeModifiedFilter";
                        if (ORTimeModifiedFiltersElementType4681 == "TimeModifiedFilter")
                        {
                                //Set field value for MatchNumericCriterion
                                VendorQueryRq.ORTimeModifiedFilters.TimeModifiedFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan);
                                //Set field value for TimeModified
                                VendorQueryRq.ORTimeModifiedFilters.TimeModifiedFilter.TimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false);
                        }
                        if (ORTimeModifiedFiltersElementType4681 == "TimeModifiedRangeFilter")
                        {
                                //Set field value for FromTimeModified
                                VendorQueryRq.ORTimeModifiedFilters.TimeModifiedRangeFilter.FromTimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false);
                                //Set field value for ToTimeModified
                                VendorQueryRq.ORTimeModifiedFilters.TimeModifiedRangeFilter.ToTimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false);
                        }
                        string ORAccountNumberFiltersElementType4682 = "AccountNumberFilter";
                        if (ORAccountNumberFiltersElementType4682 == "AccountNumberFilter")
                        {
                                //Set field value for MatchStringCriterion
                                VendorQueryRq.ORAccountNumberFilters.AccountNumberFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for AccountNumber
                                VendorQueryRq.ORAccountNumberFilters.AccountNumberFilter.AccountNumber.SetValue("ab");
                        }
                        if (ORAccountNumberFiltersElementType4682 == "AccountNumberRangeFilter")
                        {
                                //Set field value for FromAccountNumber
                                VendorQueryRq.ORAccountNumberFilters.AccountNumberRangeFilter.FromAccountNumber.SetValue("ab");
                                //Set field value for ToAccountNumber
                                VendorQueryRq.ORAccountNumberFilters.AccountNumberRangeFilter.ToAccountNumber.SetValue("ab");
                        }
                        string ORCityFiltersElementType4683 = "CityFilter";
                        if (ORCityFiltersElementType4683 == "CityFilter")
                        {
                                //Set field value for MatchStringCriterion
                                VendorQueryRq.ORCityFilters.CityFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for City
                                VendorQueryRq.ORCityFilters.CityFilter.City.SetValue("ab");
                        }
                        if (ORCityFiltersElementType4683 == "CityRangeFilter")
                        {
                                //Set field value for FromCity
                                VendorQueryRq.ORCityFilters.CityRangeFilter.FromCity.SetValue("ab");
                                //Set field value for ToCity
                                VendorQueryRq.ORCityFilters.CityRangeFilter.ToCity.SetValue("ab");
                        }
                        string ORCompanyNameFiltersElementType4684 = "CompanyNameFilter";
                        if (ORCompanyNameFiltersElementType4684 == "CompanyNameFilter")
                        {
                                //Set field value for MatchStringCriterion
                                VendorQueryRq.ORCompanyNameFilters.CompanyNameFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for CompanyName
                                VendorQueryRq.ORCompanyNameFilters.CompanyNameFilter.CompanyName.SetValue("ab");
                        }
                        if (ORCompanyNameFiltersElementType4684 == "CompanyNameRangeFilter")
                        {
                                //Set field value for FromCompanyName
                                VendorQueryRq.ORCompanyNameFilters.CompanyNameRangeFilter.FromCompanyName.SetValue("ab");
                                //Set field value for ToCompanyName
                                VendorQueryRq.ORCompanyNameFilters.CompanyNameRangeFilter.ToCompanyName.SetValue("ab");
                        }
                        string ORCountryFiltersElementType4685 = "CountryFilter";
                        if (ORCountryFiltersElementType4685 == "CountryFilter")
                        {
                                //Set field value for MatchStringCriterion
                                VendorQueryRq.ORCountryFilters.CountryFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for Country
                                VendorQueryRq.ORCountryFilters.CountryFilter.Country.SetValue("ab");
                        }
                        if (ORCountryFiltersElementType4685 == "CountryRangeFilter")
                        {
                                //Set field value for FromCountry
                                VendorQueryRq.ORCountryFilters.CountryRangeFilter.FromCountry.SetValue("ab");
                                //Set field value for ToCountry
                                VendorQueryRq.ORCountryFilters.CountryRangeFilter.ToCountry.SetValue("ab");
                        }
                        string OREMailFiltersElementType4686 = "EMailFilter";
                        if (OREMailFiltersElementType4686 == "EMailFilter")
                        {
                                //Set field value for MatchStringCriterion
                                VendorQueryRq.OREMailFilters.EMailFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for EMail
                                VendorQueryRq.OREMailFilters.EMailFilter.EMail.SetValue("ab");
                        }
                        if (OREMailFiltersElementType4686 == "EMailRangeFilter")
                        {
                                //Set field value for FromEMail
                                VendorQueryRq.OREMailFilters.EMailRangeFilter.FromEMail.SetValue("ab");
                                //Set field value for ToEMail
                                VendorQueryRq.OREMailFilters.EMailRangeFilter.ToEMail.SetValue("ab");
                        }
                        string ORFirstNameFiltersElementType4687 = "FirstNameFilter";
                        if (ORFirstNameFiltersElementType4687 == "FirstNameFilter")
                        {
                                //Set field value for MatchStringCriterion
                                VendorQueryRq.ORFirstNameFilters.FirstNameFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for FirstName
                                VendorQueryRq.ORFirstNameFilters.FirstNameFilter.FirstName.SetValue("ab");
                        }
                        if (ORFirstNameFiltersElementType4687 == "FirstNameRangeFilter")
                        {
                                //Set field value for FromFirstName
                                VendorQueryRq.ORFirstNameFilters.FirstNameRangeFilter.FromFirstName.SetValue("ab");
                                //Set field value for ToFirstName
                                VendorQueryRq.ORFirstNameFilters.FirstNameRangeFilter.ToFirstName.SetValue("ab");
                        }
                        //Set field value for IsInactive
                        VendorQueryRq.IsInactive.SetValue(true);
                        string ORLastNameFiltersElementType4688 = "LastNameFilter";
                        if (ORLastNameFiltersElementType4688 == "LastNameFilter")
                        {
                                //Set field value for MatchStringCriterion
                                VendorQueryRq.ORLastNameFilters.LastNameFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for LastName
                                VendorQueryRq.ORLastNameFilters.LastNameFilter.LastName.SetValue("ab");
                        }
                        if (ORLastNameFiltersElementType4688 == "LastNameRangeFilter")
                        {
                                //Set field value for FromLastName
                                VendorQueryRq.ORLastNameFilters.LastNameRangeFilter.FromLastName.SetValue("ab");
                                //Set field value for ToLastName
                                VendorQueryRq.ORLastNameFilters.LastNameRangeFilter.ToLastName.SetValue("ab");
                        }
                        string ORNotesFiltersElementType4689 = "NotesFilter";
                        if (ORNotesFiltersElementType4689 == "NotesFilter")
                        {
                                //Set field value for MatchStringCriterion
                                VendorQueryRq.ORNotesFilters.NotesFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for Notes
                                VendorQueryRq.ORNotesFilters.NotesFilter.Notes.SetValue("ab");
                        }
                        if (ORNotesFiltersElementType4689 == "NotesRangeFilter")
                        {
                                //Set field value for FromNotes
                                VendorQueryRq.ORNotesFilters.NotesRangeFilter.FromNotes.SetValue("ab");
                                //Set field value for ToNotes
                                VendorQueryRq.ORNotesFilters.NotesRangeFilter.ToNotes.SetValue("ab");
                        }
                        string ORPhoneFiltersElementType4690 = "PhoneFilter";
                        if (ORPhoneFiltersElementType4690 == "PhoneFilter")
                        {
                                //Set field value for MatchStringCriterion
                                VendorQueryRq.ORPhoneFilters.PhoneFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for Phone
                                VendorQueryRq.ORPhoneFilters.PhoneFilter.Phone.SetValue("ab");
                        }
                        if (ORPhoneFiltersElementType4690 == "PhoneRangeFilter")
                        {
                                //Set field value for FromPhone
                                VendorQueryRq.ORPhoneFilters.PhoneRangeFilter.FromPhone.SetValue("ab");
                                //Set field value for ToPhone
                                VendorQueryRq.ORPhoneFilters.PhoneRangeFilter.ToPhone.SetValue("ab");
                        }
                        string ORPhone2FiltersElementType4691 = "Phone2Filter";
                        if (ORPhone2FiltersElementType4691 == "Phone2Filter")
                        {
                                //Set field value for MatchStringCriterion
                                VendorQueryRq.ORPhone2Filters.Phone2Filter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for Phone2
                                VendorQueryRq.ORPhone2Filters.Phone2Filter.Phone2.SetValue("ab");
                        }
                        if (ORPhone2FiltersElementType4691 == "Phone2RangeFilter")
                        {
                                //Set field value for FromPhone2
                                VendorQueryRq.ORPhone2Filters.Phone2RangeFilter.FromPhone2.SetValue("ab");
                                //Set field value for ToPhone2
                                VendorQueryRq.ORPhone2Filters.Phone2RangeFilter.ToPhone2.SetValue("ab");
                        }
                        string ORPhone3FiltersElementType4692 = "Phone3Filter";
                        if (ORPhone3FiltersElementType4692 == "Phone3Filter")
                        {
                                //Set field value for MatchStringCriterion
                                VendorQueryRq.ORPhone3Filters.Phone3Filter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for Phone3
                                VendorQueryRq.ORPhone3Filters.Phone3Filter.Phone3.SetValue("ab");
                        }
                        if (ORPhone3FiltersElementType4692 == "Phone3RangeFilter")
                        {
                                //Set field value for FromPhone3
                                VendorQueryRq.ORPhone3Filters.Phone3RangeFilter.FromPhone3.SetValue("ab");
                                //Set field value for ToPhone3
                                VendorQueryRq.ORPhone3Filters.Phone3RangeFilter.ToPhone3.SetValue("ab");
                        }
                        string ORPhone4FiltersElementType4693 = "Phone4Filter";
                        if (ORPhone4FiltersElementType4693 == "Phone4Filter")
                        {
                                //Set field value for MatchStringCriterion
                                VendorQueryRq.ORPhone4Filters.Phone4Filter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for Phone4
                                VendorQueryRq.ORPhone4Filters.Phone4Filter.Phone4.SetValue("ab");
                        }
                        if (ORPhone4FiltersElementType4693 == "Phone4RangeFilter")
                        {
                                //Set field value for FromPhone4
                                VendorQueryRq.ORPhone4Filters.Phone4RangeFilter.FromPhone4.SetValue("ab");
                                //Set field value for ToPhone4
                                VendorQueryRq.ORPhone4Filters.Phone4RangeFilter.ToPhone4.SetValue("ab");
                        }
                        string ORPostalCodeFiltersElementType4694 = "PostalCodeFilter";
                        if (ORPostalCodeFiltersElementType4694 == "PostalCodeFilter")
                        {
                                //Set field value for MatchStringCriterion
                                VendorQueryRq.ORPostalCodeFilters.PostalCodeFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for PostalCode
                                VendorQueryRq.ORPostalCodeFilters.PostalCodeFilter.PostalCode.SetValue("ab");
                        }
                        if (ORPostalCodeFiltersElementType4694 == "PostalCodeRangeFilter")
                        {
                                //Set field value for FromPostalCode
                                VendorQueryRq.ORPostalCodeFilters.PostalCodeRangeFilter.FromPostalCode.SetValue("ab");
                                //Set field value for ToPostalCode
                                VendorQueryRq.ORPostalCodeFilters.PostalCodeRangeFilter.ToPostalCode.SetValue("ab");
                        }
                        string ORSalutationFiltersElementType4695 = "SalutationFilter";
                        if (ORSalutationFiltersElementType4695 == "SalutationFilter")
                        {
                                //Set field value for MatchStringCriterion
                                VendorQueryRq.ORSalutationFilters.SalutationFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for Salutation
                                VendorQueryRq.ORSalutationFilters.SalutationFilter.Salutation.SetValue("ab");
                        }
                        if (ORSalutationFiltersElementType4695 == "SalutationRangeFilter")
                        {
                                //Set field value for FromSalutation
                                VendorQueryRq.ORSalutationFilters.SalutationRangeFilter.FromSalutation.SetValue("ab");
                                //Set field value for ToSalutation
                                VendorQueryRq.ORSalutationFilters.SalutationRangeFilter.ToSalutation.SetValue("ab");
                        }
                        string ORStateFiltersElementType4696 = "StateFilter";
                        if (ORStateFiltersElementType4696 == "StateFilter")
                        {
                                //Set field value for MatchStringCriterion
                                VendorQueryRq.ORStateFilters.StateFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for State
                                VendorQueryRq.ORStateFilters.StateFilter.State.SetValue("ab");
                        }
                        if (ORStateFiltersElementType4696 == "StateRangeFilter")
                        {
                                //Set field value for FromState
                                VendorQueryRq.ORStateFilters.StateRangeFilter.FromState.SetValue("ab");
                                //Set field value for ToState
                                VendorQueryRq.ORStateFilters.StateRangeFilter.ToState.SetValue("ab");
                        }
                        //Set field value for StoreExchangeStatus
                        VendorQueryRq.StoreExchangeStatus.SetValue(ENStoreExchangeStatus.sesModified);
                        string ORStreetFiltersElementType4697 = "StreetFilter";
                        if (ORStreetFiltersElementType4697 == "StreetFilter")
                        {
                                //Set field value for MatchStringCriterion
                                VendorQueryRq.ORStreetFilters.StreetFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for Street
                                VendorQueryRq.ORStreetFilters.StreetFilter.Street.SetValue("ab");
                        }
                        if (ORStreetFiltersElementType4697 == "StreetRangeFilter")
                        {
                                //Set field value for FromStreet
                                VendorQueryRq.ORStreetFilters.StreetRangeFilter.FromStreet.SetValue("ab");
                                //Set field value for ToStreet
                                VendorQueryRq.ORStreetFilters.StreetRangeFilter.ToStreet.SetValue("ab");
                        }
                        string ORStreet2FiltersElementType4698 = "Street2Filter";
                        if (ORStreet2FiltersElementType4698 == "Street2Filter")
                        {
                                //Set field value for MatchStringCriterion
                                VendorQueryRq.ORStreet2Filters.Street2Filter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for Street2
                                VendorQueryRq.ORStreet2Filters.Street2Filter.Street2.SetValue("ab");
                        }
                        if (ORStreet2FiltersElementType4698 == "Street2RangeFilter")
                        {
                                //Set field value for FromStreet2
                                VendorQueryRq.ORStreet2Filters.Street2RangeFilter.FromStreet2.SetValue("ab");
                                //Set field value for ToStreet2
                                VendorQueryRq.ORStreet2Filters.Street2RangeFilter.ToStreet2.SetValue("ab");
                        }
                        string ORTermsDiscountFiltersElementType4699 = "TermsDiscountFilter";
                        if (ORTermsDiscountFiltersElementType4699 == "TermsDiscountFilter")
                        {
                                //Set field value for MatchNumericCriterion
                                VendorQueryRq.ORTermsDiscountFilters.TermsDiscountFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan);
                                //Set field value for TermsDiscount
                                VendorQueryRq.ORTermsDiscountFilters.TermsDiscountFilter.TermsDiscount.SetValue(12.34F);
                        }
                        if (ORTermsDiscountFiltersElementType4699 == "TermsDiscountRangeFilter")
                        {
                                //Set field value for FromTermsDiscount
                                VendorQueryRq.ORTermsDiscountFilters.TermsDiscountRangeFilter.FromTermsDiscount.SetValue(12.34F);
                                //Set field value for ToTermsDiscount
                                VendorQueryRq.ORTermsDiscountFilters.TermsDiscountRangeFilter.ToTermsDiscount.SetValue(12.34F);
                        }
                        string ORTermsDiscountDaysFiltersElementType4700 = "TermsDiscountDaysFilter";
                        if (ORTermsDiscountDaysFiltersElementType4700 == "TermsDiscountDaysFilter")
                        {
                                //Set field value for MatchNumericCriterion
                                VendorQueryRq.ORTermsDiscountDaysFilters.TermsDiscountDaysFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan);
                                //Set field value for TermsDiscountDays
                                VendorQueryRq.ORTermsDiscountDaysFilters.TermsDiscountDaysFilter.TermsDiscountDays.SetValue(6);
                        }
                        if (ORTermsDiscountDaysFiltersElementType4700 == "TermsDiscountDaysRangeFilter")
                        {
                                //Set field value for FromTermsDiscountDays
                                VendorQueryRq.ORTermsDiscountDaysFilters.TermsDiscountDaysRangeFilter.FromTermsDiscountDays.SetValue(6);
                                //Set field value for ToTermsDiscountDays
                                VendorQueryRq.ORTermsDiscountDaysFilters.TermsDiscountDaysRangeFilter.ToTermsDiscountDays.SetValue(6);
                        }
                        string ORTermsNetDaysFiltersElementType4701 = "TermsNetDaysFilter";
                        if (ORTermsNetDaysFiltersElementType4701 == "TermsNetDaysFilter")
                        {
                                //Set field value for MatchNumericCriterion
                                VendorQueryRq.ORTermsNetDaysFilters.TermsNetDaysFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan);
                                //Set field value for TermsNetDays
                                VendorQueryRq.ORTermsNetDaysFilters.TermsNetDaysFilter.TermsNetDays.SetValue(6);
                        }
                        if (ORTermsNetDaysFiltersElementType4701 == "TermsNetDaysRangeFilter")
                        {
                                //Set field value for FromTermsNetDays
                                VendorQueryRq.ORTermsNetDaysFilters.TermsNetDaysRangeFilter.FromTermsNetDays.SetValue(6);
                                //Set field value for ToTermsNetDays
                                VendorQueryRq.ORTermsNetDaysFilters.TermsNetDaysRangeFilter.ToTermsNetDays.SetValue(6);
                        }
                        string ORVendorCodeFiltersElementType4702 = "VendorCodeFilter";
                        if (ORVendorCodeFiltersElementType4702 == "VendorCodeFilter")
                        {
                                //Set field value for MatchStringCriterion
                                VendorQueryRq.ORVendorCodeFilters.VendorCodeFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for VendorCode
                                VendorQueryRq.ORVendorCodeFilters.VendorCodeFilter.VendorCode.SetValue("ab");
                        }
                        if (ORVendorCodeFiltersElementType4702 == "VendorCodeRangeFilter")
                        {
                                //Set field value for FromVendorCode
                                VendorQueryRq.ORVendorCodeFilters.VendorCodeRangeFilter.FromVendorCode.SetValue("ab");
                                //Set field value for ToVendorCode
                                VendorQueryRq.ORVendorCodeFilters.VendorCodeRangeFilter.ToVendorCode.SetValue("ab");
                        }
                        //Set field value for IncludeRetElementList
                        //May create more than one of these if needed
                        VendorQueryRq.IncludeRetElementList.Add("ab");
                }




                void WalkVendorQueryRs(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.rtVendorQueryRs)
                                                {
                                                        //upcast to more specific type here, this is safe because we checked with response.Type check above
                                                        IVendorRetList VendorRet = (IVendorRetList)response.Detail;
                                                        for(int z=0; z < VendorRet.Count; z++)
                                                        {
                                                                WalkVendorRet(VendorRet.GetAt(z));
                                                        }
                                                }
                                        }
                                }
                        }
                }




                void WalkVendorRet(IVendorRet VendorRet)
                {
                        if (VendorRet == null) return;
                        //Go through all the elements of IVendorRetList
                        //Get value of ListID
                        if (VendorRet.ListID != null)
                        {
                                string ListID4703 = (string)VendorRet.ListID.GetValue();
                        }
                        //Get value of TimeCreated
                        if (VendorRet.TimeCreated != null)
                        {
                                DateTime TimeCreated4704 = (DateTime)VendorRet.TimeCreated.GetValue();
                        }
                        //Get value of TimeModified
                        if (VendorRet.TimeModified != null)
                        {
                                DateTime TimeModified4705 = (DateTime)VendorRet.TimeModified.GetValue();
                        }
                        //Get value of AccountNumber
                        if (VendorRet.AccountNumber != null)
                        {
                                string AccountNumber4706 = (string)VendorRet.AccountNumber.GetValue();
                        }
                        //Get value of City
                        if (VendorRet.City != null)
                        {
                                string City4707 = (string)VendorRet.City.GetValue();
                        }
                        //Get value of CompanyName
                        if (VendorRet.CompanyName != null)
                        {
                                string CompanyName4708 = (string)VendorRet.CompanyName.GetValue();
                        }
                        //Get value of Country
                        if (VendorRet.Country != null)
                        {
                                string Country4709 = (string)VendorRet.Country.GetValue();
                        }
                        //Get value of EMail
                        if (VendorRet.EMail != null)
                        {
                                string EMail4710 = (string)VendorRet.EMail.GetValue();
                        }
                        //Get value of FirstName
                        if (VendorRet.FirstName != null)
                        {
                                string FirstName4711 = (string)VendorRet.FirstName.GetValue();
                        }
                        //Get value of IsInactive
                        if (VendorRet.IsInactive != null)
                        {
                                bool IsInactive4712 = (bool)VendorRet.IsInactive.GetValue();
                        }
                        //Get value of LastName
                        if (VendorRet.LastName != null)
                        {
                                string LastName4713 = (string)VendorRet.LastName.GetValue();
                        }
                        //Get value of Notes
                        if (VendorRet.Notes != null)
                        {
                                string Notes4714 = (string)VendorRet.Notes.GetValue();
                        }
                        //Get value of Phone
                        if (VendorRet.Phone != null)
                        {
                                string Phone4715 = (string)VendorRet.Phone.GetValue();
                        }
                        //Get value of Phone2
                        if (VendorRet.Phone2 != null)
                        {
                                string Phone24716 = (string)VendorRet.Phone2.GetValue();
                        }
                        //Get value of Phone3
                        if (VendorRet.Phone3 != null)
                        {
                                string Phone34717 = (string)VendorRet.Phone3.GetValue();
                        }
                        //Get value of Phone4
                        if (VendorRet.Phone4 != null)
                        {
                                string Phone44718 = (string)VendorRet.Phone4.GetValue();
                        }
                        //Get value of PostalCode
                        if (VendorRet.PostalCode != null)
                        {
                                string PostalCode4719 = (string)VendorRet.PostalCode.GetValue();
                        }
                        //Get value of Salutation
                        if (VendorRet.Salutation != null)
                        {
                                string Salutation4720 = (string)VendorRet.Salutation.GetValue();
                        }
                        //Get value of State
                        if (VendorRet.State != null)
                        {
                                string State4721 = (string)VendorRet.State.GetValue();
                        }
                        //Get value of StoreExchangeStatus
                        if (VendorRet.StoreExchangeStatus != null)
                        {
                                ENStoreExchangeStatus StoreExchangeStatus4722 = (ENStoreExchangeStatus)VendorRet.StoreExchangeStatus.GetValue();
                        }
                        //Get value of Street
                        if (VendorRet.Street != null)
                        {
                                string Street4723 = (string)VendorRet.Street.GetValue();
                        }
                        //Get value of Street2
                        if (VendorRet.Street2 != null)
                        {
                                string Street24724 = (string)VendorRet.Street2.GetValue();
                        }
                        //Get value of Terms
                        if (VendorRet.Terms != null)
                        {
                                string Terms4725 = (string)VendorRet.Terms.GetValue();
                        }
                        //Get value of TermsDiscount
                        if (VendorRet.TermsDiscount != null)
                        {
                                float TermsDiscount4726 = (float)VendorRet.TermsDiscount.GetValue();
                        }
                        //Get value of TermsDiscountDays
                        if (VendorRet.TermsDiscountDays != null)
                        {
                                int TermsDiscountDays4727 = (int)VendorRet.TermsDiscountDays.GetValue();
                        }
                        //Get value of TermsNetDays
                        if (VendorRet.TermsNetDays != null)
                        {
                                int TermsNetDays4728 = (int)VendorRet.TermsNetDays.GetValue();
                        }
                        //Get value of VendorCode
                        if (VendorRet.VendorCode != null)
                        {
                                string VendorCode4729 = (string)VendorRet.VendorCode.GetValue();
                        }
                        if (VendorRet.DataExtRetList != null)
                        {
                                for (int i4730 = 0; i4730 < VendorRet.DataExtRetList.Count; i4730++)
                                {
                                        IDataExtRet DataExtRet = VendorRet.DataExtRetList.GetAt(i4730);
                                        //Get value of OwnerID
                                        string OwnerID4731 = (string)DataExtRet.OwnerID.GetValue();
                                        //Get value of DataExtName
                                        string DataExtName4732 = (string)DataExtRet.DataExtName.GetValue();
                                        //Get value of DataExtType
                                        ENDataExtType DataExtType4733 = (ENDataExtType)DataExtRet.DataExtType.GetValue();
                                        //Get value of DataExtValue
                                        string DataExtValue4734 = (string)DataExtRet.DataExtValue.GetValue();
                                }
                        }
                }




        }
}