I have a Google Sheets form that has been set up to take form data, format it into a QBXML Invoice Add Request, then save it as a text document (.gdoc). My issue is that the QBFC C# sample code that I have found is all based around building the QBXML request and then sending that; I haven't been able to figure out how to send the ready-made QBXML document to Quickbooks Desktop as a request.
For example, this code doesn't work because DoRequests()
needs to be passed an IMsgSetRequest
and won't accept a string:
String xmlDoc = File.ReadAllText("J:\\My Drive\\XML Test Doc.gdoc");
IMsgSetResponse responseMsgSet = sessionManager.DoRequests(xmlDoc);
And this won't work either, because you can't convert form a string to an IMsgSetRequest:
String xmlDoc = File.ReadAllText("J:\\My Drive\\XML Test Doc.gdoc");
IMsgSetRequest requestMsgSet = xmlDoc;
IMsgSetResponse responseMsgSet = sessionManager.DoRequests(requestMsgSet);
I'm assuming (and hoping) that there's a simple solution that I'm just overlooking. But if there is, it's eluded me for long enough that I've decided that it's worth reaching out to you folks for assistance. Thanks in advance.