Jump to content
Server Maintenance This Week. ×

PCQO_RqUseJSON


This topic is 2279 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

I'm successfully using PCQO_RqUseJSON to add Journal Entries into QBO. However, I just added a way for the script to check if the vendor was already in QBO. This works. However, afterwards, it goes back to the journal entry to be entered. When it calls PCQO_RqExecute, it now calls the Vendor Query again. I tried re-loading the session info, but it doesn't seem to clear it. Essentially:

PCQO_RqNew [ Select: On; Results: ; Operation: "Query"; Entity Type: "Vendor" ]
PCQO_RqAddFieldWithValue [ Select: On; Results: ; Field Name: "DisplayName"; Field Value: VENDORS::Short Name ]

PCQO_RqExecute [ Select: On; Results: $result ]

PCQO_RqUseJSON [ Select: On; Results: ; JSON: $json.payitem ]

PCQO_RqExecute [ Select: On; Results: $result ]

What do I need to do so that the 2nd Execute script step sends the custom JSON instead resending the first query?

Link to comment
Share on other sites

Hi Wendy,

It looks like the call to PCQO_RqUseJSON is not storing a result in the "Results" specifier. It's possible that PCQO_RqUseJSON might be experiencing an error (such as a malformed JSON document or some other exception), which would prevent the plug-in from properly replacing the request JSON with the contents of $json.payitem; that's why the second PCQO_RqExecute is still executing the vendor query JSON from before.  If you can, could you store the results of PCQO_RqUseJSON into a variable (the $result variable should work just fine), and check it to see if the result is "!!ERROR!!" or "?"? If so, PCQO_SGetStatus should help tell a little more about what could be the root of the issue.

Hope this helps!

Link to comment
Share on other sites

  • Newbies

Hi, The JSON I am sending is correct. However, what I figured out, was if I add PCQO_RqNew with Operation: "Create" (and entity type left blank) before PCQO_RqUseJSON, it runs correctly. Hope that helps someone else!

 

Link to comment
Share on other sites

This topic is 2279 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.