Author Topic: QB 2013 Contacts  (Read 1668 times)

GarrettDebski13

  • Member
  • *
  • Posts: 3
QB 2013 Contacts
« on: March 06, 2013, 04:24:50 PM »
QB 13 has the new Contacts tab in customers which allows unlimited number of related Contacts. Trying to write a script to pull all these contacts for a specific account.  Anyone know what table to query?  Having trouble finding documentation on this new contacts table.

Geoffrey Gerhard

  • Guru
  • Member
  • ****
  • Posts: 470
Re: QB 2013 Contacts
« Reply #1 on: March 07, 2013, 08:18:20 AM »
You'll query the Customers table. You'll continue to get a result for Contact and AltContact when they have a value, but the new architecture supplies a set of related  AdditionalContactRef records. I don't use the native functions (I parse the xml directly with Xpath and the ZParseXML function) but I'm fairly certain that you'll use the RsOpenFirstRelatedRecord ( "AdditionalContactRef" ), RsOpenNextRelatedRecord, construction to loop through all the Response's AdditionalContactRef elements.

HTH!

Geoffrey Gerhard
Creative Solutions Incorporated
14000 Creekside Drive
Matthews, NC  28105
704) 814-6852

GarrettDebski13

  • Member
  • *
  • Posts: 3
Re: QB 2013 Contacts
« Reply #2 on: March 07, 2013, 03:07:27 PM »
I tried using 'AdditionalContactRef' but only allows you to access other contact types (i.e. twitter, Facebook, etc).  It returns a 'type' and a 'value'.  I am looking for the whole 'Additional Contact' that you can add on the new "Contacts" tab in 2013.  I tried using 'ContactsRet' but it is returning as invalid.  Any ideas?

Geoffrey Gerhard

  • Guru
  • Member
  • ****
  • Posts: 470
Re: QB 2013 Contacts
« Reply #3 on: March 07, 2013, 04:51:53 PM »
Whoops! You're right, I meant ContactsRet.

Just looked to see what comes back in the qbXML result when running a Query for a Customer that I deliberately setup to have extra contacts. Not only are NO ContactsRet elements returned, it appears that some QB files didn't convert correctly and failed to designate the former AltContact as a "Secondary Contact". In such a case, the AltContact value is not returned unless you change it's Contact Type value from "Additional Contact".

In short, this part of the interaction between QB and the API via the plug-in is a mess. Don't know for sure, but I suspect the problem is QB and not the plug-in. And the fact that the ContactsRet and AdditionalContactRef elements in the OSR have no info other than the name tends to confirm that suspicion.

HTH!

Geoffrey Gerhard
Creative Solutions Incorporated
14000 Creekside Drive
Matthews, NC  28105
704) 814-6852

GarrettDebski13

  • Member
  • *
  • Posts: 3
Re: QB 2013 Contacts
« Reply #4 on: March 08, 2013, 08:55:52 AM »
Ok - well glad I'm not crazy. Couldn't get anything to work and the documentation simply doesn't exist.  Thanks for the help!