Often times when working with Dynamics GP you will come across something that is asking for a GP company ID. This can either be an integration application, or a registration program for a cool addin, or a number of other pieces that need to connect to your data. GP has three ways to identify a company: Company Name, Database Name and Company ID. All of these luckily can be found in one table in a database. By selecting out of the SY01500 table we can determine how to find your GP company ID. Here is an example query:
How to find your GP Company ID
SELECT CMPNYNAM, INTERID, CMPANYID FROM DYNAMICS.dbo.SY01500
This will return back the Company Name as CMPNYNAM, the Database name as INTERID and the Company ID as CMPANYID. The company ID will always be an integer, and the test company is usually -1. The InterID is always a three letter word and potentially a number. Example: DYN01, DYN02, etc. The Company Name will be the value that you fill out during setup. These tables are how to find your GP company ID and they will provide additional information about your company if you want to look further by selecting all columns.
While looking for how to find your GP company ID may seem somewhat difficult in GP it is typically best to look directly at SQL. GP does not have a great method for looking up company information and you will likely still be asking yourself how to find your GP company ID. Again, because this information is typically only required for an integraiton or special third party addins it is unlikely that GP will show you how to find your GP company ID anytime soon.
If you are looking for more information on how to find your GP company ID
Check out this excellent SQL posting from Victoria Yudin about how to find your GP company ID in SQL.