Nick
Nick

Reputation: 1891

Register integrated app in QuickBooks

I am trying to get an app to show up in the list of Integrated Applications in QB. Don't know what I'm doing wrong. My code is as follows, on a button click event:

QBSessionManager sessionManager = new QBSessionManager();
sessionManager.OpenConnection("", "QB Test");
sessionManager.BeginSession(@"PATH TO QBW FILE", ENOpenMode.omDontCare);

when I run this without QB open, I get the error:

This application is unable to log into this QuickBooks company data file automatically; the QuickBooks Administrator can grant permission through the Integrated Applications preferences.

With QB open, I get:

This application has not accessed this QuickBooks company data file before. Only the QuickBooks Administrator can grant permission to access a QuickBooks company file for the first time.

With QB open, running the application as administrator, a new QB window opens and I get:

The application trying to connect to QuickBooks is not supported while multiple instances of QuickBooks are running.

I never see my application listed in the integrated applications list of programs for me to allow it permissions

So:

Upvotes: 0

Views: 942

Answers (3)

jjthebig1
jjthebig1

Reputation: 638

First time running your app, open Quickbooks, log in as admin, and change to single user mode. Then run your code and you will get the popup in QB to authorize the application.

Upvotes: 0

Dipen Shah
Dipen Shah

Reputation: 26075

Working with QuickBooks can be a pain, so here are my 2 cents based on my experience:

  1. Make sure you are building application in x86
  2. Use OpenConnection2 instead of OpenConnection as OpenConnection method is deprecated OpenConnection2("", "My Company", ENConnectionType.ctLocalQBD);

  3. Run QuickBooks in a single user mode

  4. If you have users setup for QuickBooks, log in as an admin user in QuickBooks
  5. Run your application in normal mode. If you are running your application in an elevated mode (Run as Administrator) make sure QuickBooks is also running in elevated mode.

That's all and your application should be able to connect to QB without any hiccups.

Upvotes: 2

Thorin Jacobs
Thorin Jacobs

Reputation: 300

I have seen this occur when using QuickBooks Enterprise edition in Windows, when my application was running using elevated permissions, but QuickBooks was opened without elevated permissions. This happened in my case because my application was considered as being used by a different Windows user, and so QuickBooks attempted to open a new instance instead of prompting me to allow access.

I assume you are using Windows, as, to my recollection QuickBooks for Mac has a much more limited integration surface.

I would check to ensure that neither your application nor QuickBooks are running as Windows admin, and make sure you are logged into QuickBooks as a QuickBooks administrator when requesting access for the first time. If successful, you should be prompted with a modal in QuickBooks requesting access.

Upvotes: 0

Related Questions