Sandip.Nascar
Sandip.Nascar

Reputation: 335

Get company name that is opened in Quickbooks using QBFC

I can get the CompanyFilename using QBFC but could not get the appropriate class to get the opened company name in Quickbooks.

Any idea will be highly appreciated.

Upvotes: 1

Views: 692

Answers (1)

Ward
Ward

Reputation: 116

I know that this is an older question. After searching for other answers related to the QBFC, I thought I would post an answer. It might help someone who is getting started.

The IDN Unified OSR (Onscreen Reference) is an excellent resource for this type of question. It is a little cumbersome to use. But, it will give you a sample bit of code for testing in either VB.NET or C#. You do have to know what request message you want to learn about. In this case, you are looking for CompanyQuery\ ICompanyQuery. The sample code that is generated shows how to build the request and parse the response. The function in the sample code named BuildCompanyQueryRq has some invalid code that you will need to change for your solution.

CompanyQueryRq.IncludeRetElementList.Add("ab");

Change it to :

CompanyQueryRq.IncludeRetElementList.Add("CompanyName");

That will request only the CompanyName property. If you wanted to add more properties this is were you would use the name of the property to add to the list. If you delete the line altogether, you will retrieve ALL of the fields. It is recommended to only request what you need.

NOTE: According to the documentation that I have read, it is case sensitive.

You then need to look at the WalkCompanyQueryRs function to see how to get the value returned. The sample will retrieve as much data from the response as possible. You will need to trim the code back to the requested fields.

FYI: The OSR has the ability to change the version of the SDK specification used as well when generating the reference.

Upvotes: 2

Related Questions