The selected company is not configured as a company

The selected company is not configured as a company of the current Microsoft Dynamics GP system database.  You must resolve the database configuration to log in to the company.

I was very frustrated to get this message.  Here is script to resolve it.  

 

select
CompanyDbId = c.CMPANYID
,DynamicsDbId = d.CMPANYID
,DynamicsDbName = d.INTERID
,DynamicsCompanyName = d.CMPNYNAM
from sy00100 c
left join dynamics..sy01500 d
on d.interid = db_name()   
 
--update SY00100 set CMPANYID = (select CMPANYID from DYNAMICS..sy01500 where INTERID = db_name())

RealWorldCode gives developers practical, real‑world solutions with clean, working code — no fluff, no theory, just answers.
Links
Home
Knowledge Areas
Sitemap
Contact
Et cetera
Privacy Policy
Terms and Conditions
Cookie Preferences