Quickbooks Online API - P&L Object and Queries

29 views
Skip to first unread message

Efficient Small Business

unread,
Apr 20, 2020, 12:06:15 PM4/20/20
to Google Apps Script Community
Two questions:

First: 
I am working on connecting to QBO, and I was wondering if anyone has a function for parsing/displaying the P&L report object?

Second:
I am able to run the query "select * from Customer" but when I add a WHERE condition like "select * from Customer Where Metadata.LastUpdatedTime > '2015-03-01'" that contains a "<" or ">", I get the error below. How can I run a query with a comparison operator without making UrlFetchApp angry? 




Any help is appreciated, thanks!
Micah

Andrew Roberts

unread,
Apr 20, 2020, 12:26:40 PM4/20/20
to google-apps-sc...@googlegroups.com
Try putting your query through encodeUriCompnent before you send it.

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/d062444e-a73a-424a-8fd7-594830887531%40googlegroups.com.

Efficient Small Business

unread,
Apr 20, 2020, 12:39:24 PM4/20/20
to Google Apps Script Community
Thanks Andrew, that did it!


On Monday, April 20, 2020 at 9:26:40 AM UTC-7, andrew wrote:
Try putting your query through encodeUriCompnent before you send it.

On Mon, 20 Apr 2020 at 17:06, Efficient Small Business <efficient.s...@gmail.com> wrote:
Two questions:

First: 
I am working on connecting to QBO, and I was wondering if anyone has a function for parsing/displaying the P&L report object?

Second:
I am able to run the query "select * from Customer" but when I add a WHERE condition like "select * from Customer Where Metadata.LastUpdatedTime > '2015-03-01'" that contains a "<" or ">", I get the error below. How can I run a query with a comparison operator without making UrlFetchApp angry? 

Exception: Invalid argument: https://sandbox-quickbooks.api.intuit.com/v3/company/4620816365003545450/query?query=select%20*%20from%20Customer%20Where%20Metadata.LastUpdatedTime%20>%20'2015-03-01'&minorversion=47 (line 66, file "Code")


Any help is appreciated, thanks!
Micah

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-community+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages