Reputation: 101
I want to filter invoice with ship date here is my code
IInvoiceQuery invoiceQueryRq = requestMsgSet.AppendInvoiceQueryRq();
invoiceQueryRq.IncludeLineItems.SetValue(true);
//want ship date filter here
IMsgSetResponse responseMsgSet = sessionManager.DoRequests(requestMsgSet);
IResponse response = responseMsgSet.ResponseList.GetAt(0);
IInvoiceRetList invoiceRetList = (IInvoiceRetList)response.Detail;
I am able to filter with invoice Modified Date but I am not able to do with ship date. please help me
Upvotes: 0
Views: 164
Reputation: 28032
The QuickBooks OSR
shows the fields you can filter by:
Specifically:
<InvoiceQueryRq metaData="ENUMTYPE" iterator="ENUMTYPE" iteratorID="UUIDTYPE">
<!-- BEGIN OR -->
<TxnID >IDTYPE</TxnID> <!-- optional, may repeat -->
<!-- OR -->
<RefNumber >STRTYPE</RefNumber> <!-- optional, may repeat -->
<!-- OR -->
<RefNumberCaseSensitive >STRTYPE</RefNumberCaseSensitive> <!-- optional, may repeat -->
<!-- OR -->
<MaxReturned >INTTYPE</MaxReturned> <!-- optional -->
<!-- BEGIN OR -->
<ModifiedDateRangeFilter> <!-- optional -->
<FromModifiedDate >DATETIMETYPE</FromModifiedDate> <!-- optional -->
<ToModifiedDate >DATETIMETYPE</ToModifiedDate> <!-- optional -->
</ModifiedDateRangeFilter>
<!-- OR -->
<TxnDateRangeFilter> <!-- optional -->
<!-- BEGIN OR -->
<FromTxnDate >DATETYPE</FromTxnDate> <!-- optional -->
<ToTxnDate >DATETYPE</ToTxnDate> <!-- optional -->
<!-- OR -->
<!-- DateMacro may have one of the following values: All, Today, ThisWeek, ThisWeekToDate, ThisMonth, ThisMonthToDate, ThisCalendarQuarter, ThisCalendarQuarterToDate, ThisFiscalQuarter, ThisFiscalQuarterToDate, ThisCalendarYear, ThisCalendarYearToDate, ThisFiscalYear, ThisFiscalYearToDate, Yesterday, LastWeek, LastWeekToDate, LastMonth, LastMonthToDate, LastCalendarQuarter, LastCalendarQuarterToDate, LastFiscalQuarter, LastFiscalQuarterToDate, LastCalendarYear, LastCalendarYearToDate, LastFiscalYear, LastFiscalYearToDate, NextWeek, NextFourWeeks, NextMonth, NextCalendarQuarter, NextCalendarYear, NextFiscalQuarter, NextFiscalYear -->
<DateMacro >ENUMTYPE</DateMacro> <!-- optional -->
<!-- END OR -->
</TxnDateRangeFilter>
<!-- END OR -->
<EntityFilter> <!-- optional -->
<!-- BEGIN OR -->
<ListID >IDTYPE</ListID> <!-- optional, may repeat -->
<!-- OR -->
<FullName >STRTYPE</FullName> <!-- optional, may repeat -->
<!-- OR -->
<ListIDWithChildren >IDTYPE</ListIDWithChildren> <!-- optional -->
<!-- OR -->
<FullNameWithChildren >STRTYPE</FullNameWithChildren> <!-- optional -->
<!-- END OR -->
</EntityFilter>
<AccountFilter> <!-- optional -->
<!-- BEGIN OR -->
<ListID >IDTYPE</ListID> <!-- optional, may repeat -->
<!-- OR -->
<FullName >STRTYPE</FullName> <!-- optional, may repeat -->
<!-- OR -->
<ListIDWithChildren >IDTYPE</ListIDWithChildren> <!-- optional -->
<!-- OR -->
<FullNameWithChildren >STRTYPE</FullNameWithChildren> <!-- optional -->
<!-- END OR -->
</AccountFilter>
<!-- BEGIN OR -->
<RefNumberFilter> <!-- optional -->
<!-- MatchCriterion may have one of the following values: StartsWith, Contains, EndsWith -->
<MatchCriterion >ENUMTYPE</MatchCriterion> <!-- required -->
<RefNumber >STRTYPE</RefNumber> <!-- required -->
</RefNumberFilter>
<!-- OR -->
<RefNumberRangeFilter> <!-- optional -->
<FromRefNumber >STRTYPE</FromRefNumber> <!-- optional -->
<ToRefNumber >STRTYPE</ToRefNumber> <!-- optional -->
</RefNumberRangeFilter>
<!-- END OR -->
<CurrencyFilter> <!-- optional -->
<!-- BEGIN OR -->
<ListID >IDTYPE</ListID> <!-- optional, may repeat -->
<!-- OR -->
<FullName >STRTYPE</FullName> <!-- optional, may repeat -->
<!-- END OR -->
</CurrencyFilter>
<!-- PaidStatus may have one of the following values: All [DEFAULT], PaidOnly, NotPaidOnly -->
<PaidStatus >ENUMTYPE</PaidStatus> <!-- optional -->
<!-- END OR -->
<IncludeLineItems >BOOLTYPE</IncludeLineItems> <!-- optional -->
<IncludeLinkedTxns >BOOLTYPE</IncludeLinkedTxns> <!-- optional -->
<IncludeRetElement >STRTYPE</IncludeRetElement> <!-- optional, may repeat -->
<OwnerID >GUIDTYPE</OwnerID> <!-- optional, may repeat -->
</InvoiceQueryRq>
Notice that ShipDate
is not a filterable field. You can't filter by it.
If you want to filter by it, you'll have to pull all of the invoices from QuickBooks, and then filter them within your application yourself.
Upvotes: 1