Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 18 JUL 2007 02:11:04PM Richard Richter wrote:

I'm want to pass customer data and accounts receivable data from OIS8 to QuickBooks Pro 2005. I've looked at the Quickbooks SDK 6.0 and the XML section of OIS and to tell the truth, I'm lost.

Can anybody either get me started or at least point me in the right direction? I'd really appreciate the help.

Thanks,

Richard Richter


At 18 JUL 2007 03:24PM Bob Carten wrote:

I have had good luck using the QBXML processor.

Obatain a copy of Quickbooks

Download the Quickbooks SDK from the Intuit download site

Read the documentation on the QBXML Processor.

You will find that there is an xml template for each supported transaction.

Edit the templates so they look like %colname%

Write a program which reads the table and does a SWAP "%COLNAME%" with {COLNAME} in template to make a valid XML message

Use OLE to send the message to Quickbooks, retrieve the response.

Outline of a program appears below.

HTH

- Bob

pre.code {

 background-color: #E5E5E5;
 border: 1px solid #000000;
 width: 640px;
 padding: 5px;
 font-family: courier, verdana, arial, serif;
 margin: 0px 10px auto;

}

Subroutine QbXml_RequestProcessor(void)

/*
* bare bones Quickbooks example.
* To make it real, 
* Set up XML templates for each transaction type.  put tokens in for values * 
* Change header to be QbXml_RequestProcessor(trans_type, id)
...
<Name>%Name%</Name>
<IsActive>%IsActive%</IsActive> 
<CompanyName>%CompanyName%</CompanyName>
...

* set up a mapping file that says token /table /column

program should look like
rec=Xlate('QBCONFIG', trans,'', 'X')
template_file=rec<1>
source_table=rec<2>

items=rec<3>
colnames=rec<4>
convs=rec<5>

osread inrq from template_File ...

open @dict ...
@id=id
@record=Xlate(source_file, @id, '', 'X')
for i=1 to colcount  
  val=calculate(colname)
  if convs<i> then
    val=oconv(val, convs<i>)
  end
  swap '%':item:'%' with val in inRq
next

*/

   $insert Logical
   $insert Msg_Equates
   
   equ crlf$ to \0D0A\
   equ tab$ to \09\
   debug
   response='

   *step 1: create QBXMLRPE object (EXE wrapper around QBXMLRP)
   rp=OleCreateInstance("QBXMLRP.RequestProcessor")
   if ( OleStatus() <> 0 ) then
      Msg(@window, " <BR> Cannot createObject QBXMLRPe.RequestProcessor: " )
      Return ''
   end

   *step2: Connect to QB
   x=rp->OpenConnection( "OPENINSIGHT", "QBXML_Connector" )
   if ( OleStatus() <> 0 ) then
      Msg(@window, " <BR> OpenConnection failed: " )
      return ''
   end

   ticket=rp->BeginSession( "", 0 )
   if ( OleStatus() <> 0 ) then
      Msg(@window, " <BR> BeginSession failed (make sure QuickBooks is running and access is granted to this application): " )
      x=rp->CloseConnection()
      return ''
   end

   *step3: send request
   inRq=  '<?xml version=1.0" ?>'
   inRq := '<?qbxml version=2.0"?>'
   inRq :=  '<QBXML>'
   inRq :=  '<QBXMLMsgsRq onError=continueOnError">'
   inRq :=  '<CustomerQueryRq requestID=0"/>'
   inRq :=  '</QBXMLMsgsRq>'
   inRq :=  '</QBXML>'
   
   outRs=rp->ProcessRequest(ticket, inRq)  
   if ( OleStatus() <> 0 ) then
      Msg(@window, " <BR/> ProcessReques failed: " )
   end else 
      Response= <BR/> Customer Query Response: <p/> <TEXTAREA rows=20" cols=80">' : outRs : '</TEXTAREA'
   end

   x=rp->EndSession( ticket)
   x=rp->CloseConnection()

return response

At 18 JUL 2007 10:01PM Chuck Nichols wrote:

I have Quickbooks Pro 2006 and have been able to write a routine in AREV that exports a .IIF file which then imports in to Quickbooks posting all the appropriate accounts. Previously we had Quickbooks Pro 2005 and I was not able to find how to do this - did not look too hard in the 2005 version, so it may be there. Not sure.

Be happy to share the code with you


At 19 JUL 2007 05:36PM Barry Stevens wrote:

I actually did not know you could do that.

I am looking at a job for a customer that has quick books, and they were just going to post from a eom summary.

I would be VERY interested in your code.

[email protected]


At 20 JUL 2007 01:14PM Karen Oland wrote:

I'd also be interested in the code ….


At 21 JUL 2007 02:51PM Gerald Lovel wrote:

Barry,

I wrote a generic export program in AREV that created the .IIS files with header lines, columns, loop controls for multivalues, etc. We used it to define QB exports for Accounts, Products, Invoices, etc. Write to me, [email protected], and I will send you AREV source. (This is one of maybe three utilities I haven't yet ported to OI.)

Gerald


At 23 JUL 2007 03:45PM Chuck Nichols wrote:

Karen,

Send me your email and i will forward code along.

Chuck Nichols

[email protected]

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/3059a696dcb510878525731c0063e43b.txt
  • Last modified: 2024/01/04 20:57
  • by 127.0.0.1