QuickBooks Integrator 2020 Node.js Edition

Questions / Feedback?

QBConnectionMode Property

The mode of connection to QuickBooks.

Syntax

 salesorder.getQBConnectionMode([callback])
 salesorder.setQBConnectionMode( QBConnectionMode, [callback])

Possible Values

  0 (cmDontCare), 
  1 (cmSingleUserMode), 
  2 (cmMultiUserMode)

Default Value

0

Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for the getQBConnectionMode([callback]) method is defined as:

function(err, data){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'data' is the value returned by the method.

The callback for the setQBConnectionMode([callback]) method is defined as:

function(err){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

The mode of connection to QuickBooks. Specifies whether the integrated application logs in using single-user or multi-user mode.

The following values are permitted:

cmDontCare0
cmSingleUserMode1
cmMultiUserMode2

About Single-User and Multi-User Modes

If the connection to QuickBooks is made in single-user mode, QuickBooks will give exclusive access to the connecting application. It will lock out all other integrated applications; if QuickBooks and the company file are not already open in single-user mode by the QuickBooks user, the user will be locked out as well.

If the connection is made in multi-user mode, QuickBooks will allow all other integrated applications access. QuickBooks end users on other machines will also be allowed to access the file. However, if the application (rather than the end user) starts QuickBooks automatically, end users on the same machine will still be locked out.

If cmDontCare is specified, an appropriate connection mode will be chosen automatically. If a company file is open in either single-user or multi-user mode, the integrated application will accept that connection mode. If no company file is open, QuickBooks will login automatically in multi-user mode.

About Integrated and Automatic Login

Note that your application's login to QuickBooks might be either automatic or interactive. Interactive login is used when QuickBooks is already open. Access will be shared between the integrated application and the QuickBooks end user, and if multi-user mode is specified, other applications and users will have access as well. When a connection is made, QuickBooks will show a dialog window to the user, and ask the user if he/she wants to permit the connection.

Automatic login is used when QuickBooks is not already open. QuickBooks will be opened in the background, and will run until your application has finished its connection with QuickBooks. The QuickBooks user interface will not be displayed, and end-users on the same machine will be locked out. End-users on other machines, however, will be allowed access if multi-user mode is specified.

By default integrated applications do not have permission to login automatically. The first time an application interacts with QuickBooks, it must do so interactively, with QuickBooks and the company file open. The QuickBooks end user may then grant automatic login permission through Edit Preferences - Integrated Applications in the QuickBooks user interface. Click on the name of the application and then "Properties", and you may allow the application to login automatically.

For automatic login the CompanyFile must be specified. CompanyFile, ApplicationName, and other properties relating to the QuickBooks connection may be edited through QBConnectionString.

Data Type

Integer

Copyright (c) 2021 /n software inc. - All rights reserved.
QuickBooks Integrator 2020 Node.js Edition - Version 20.0 [Build 7941]