January 26, 20188 yr 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?
January 26, 20188 yr 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!
January 29, 20188 yr Author 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!
Create an account or sign in to comment