QuickBooks Integrator 2020 C++ Edition

Questions / Feedback?

GetByName Method

Gets a single record from QuickBooks.

Syntax

ANSI (Cross Platform)
int GetByName(const char* lpszFullName);

Unicode (Windows)
INT GetByName(LPCWSTR lpszFullName);
- (void)getByName:(NSString*)fullName;
#define MID_CUSTOMER_GETBYNAME 8

INQB_EXTERNAL int INQB_CALL InQB_Customer_Do(void *lpObj, int methid, int cparam, void *param[], int cbparam[], int64 *lpllVal);

Remarks

GetByName may be used to retrieve a single object from QuickBooks, based on its full Name. For Employee and Vendor objects, and for most Customer objects, the full name is given by the Name (CustomerName, VendorName, or EmployeeName property. For Customer objects that represent jobs or sub-customers, the full name will include the parent objects' name(s), and is given by the FullName special field. When the method is called, a search will be initiated for the requested object. If it is found, all properties of the class will be set to the information retrieved from QuickBooks. The QBResponseAggregate property will also be set to the entire QBXML aggregate received from QuickBooks.

The full name of any class may be used for the parameter. So, for example, the following pseudocode would get customer information for a Customer listed on an Invoice:

Customer.GetByName( Invoice.CustomerName )

The GetByName method, present only in entity objects (Customer, Vendor, and Employee) and QBObject, may be used to get an object based on its Name. To retrieve multiple objects, to retrieve transaction objects whose name is not known, or to perform more advanced searches the ObjSearch class may be used.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

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