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.