web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Selected Company Not Configured as a company....

(1) ShareShare
ReportReport
Posted on by 25,195

I have a client that is getting the error "The selected company is not configured as a company of the current Microsoft Dynamics GP system database...."  We created this new company by (a) using GP Utilities to create a company (b) restore a copy of the live database to this db (c) attempt to login and get this message.

Any suggestions or resolutions would be appreciated.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at
    RE: Selected Company Not Configured as a company....

    Hi Richard,

    Have you run the InterID script that needs to be run after a restore?

    Maybe look in the SY00100 table. check that the DBNAME field says 'DYNAMICS'

    Ian.

  • Richard Whaley Profile Picture
    25,195 on at
    RE: Selected Company Not Configured as a company....

    That was it exactly...thanks

  • Jim Lines Profile Picture
    4 on at
    RE: Selected Company Not Configured as a company....

    Guys,

    I'm having the same issue with GP 2013.  I ran the InterID script as normal and still have the problem.  When I look at SY00100, the DB name is indeed Dynamics, but the CMPANYID is incorrect.  It is set to the company in which I made the copy.   This is leading me to believe that my InterID script is not correct.  The version I am using has this header:

    /*Revised May 2013 to work with Microsoft Dynamics GP 2013*/

    /*This script is supported with Microsoft Dynamics GP 10.0, 2010 and 2013*/

    Do either of you have the most recent copy so I can see if perhaps my script got changed?  I'm in my dev environment so I am no two worried about breaking anything.  

    Thanks in advance!

    Jim

  • Bron Profile Picture
    4 on at
    RE: Selected Company Not Configured as a company....

    FYI - I always use SQL to update the company id to the correct value and  never have a problem.......I looked for a different company id script and haven't found anything.

    Jim - if you find something let us know.........

  • L Vail Profile Picture
    65,271 on at
    RE: Selected Company Not Configured as a company....

    Hi,

    The new script can be found here: dynamicsuniversity.com/.../error-selected-company-not-configured-company-current-microsoft-dynamics-gp-system-database

    Kind regards,

    Leslie

  • Suggested answer
    L Vail Profile Picture
    65,271 on at
    RE: Selected Company Not Configured as a company....

    I just notices my link pointed to an image.  I looked around a bit and found where Frank Hammely had posted the script such that it could be copied.  Here it is:

    USE XXXX (database)

    if exists (select 1 from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = 'SY00100') begin

    declare @Statement varchar(850)

    select @Statement = 'declare @cStatement varchar(255)

    declare G_cursor CURSOR for

    select case when UPPER(a.COLUMN_NAME) in (''COMPANYID'',''CMPANYID'')

    then ''update ''+a.TABLE_NAME+'' set ''+a.COLUMN_NAME+'' = ''+ cast(b.CMPANYID as char(3))

    else ''update ''+a.TABLE_NAME+'' set ''+a.COLUMN_NAME+'' = ''''''+ db_name()+'''''''' end

    from INFORMATION_SCHEMA.COLUMNS a, '+rtrim(DBNAME)+'.dbo.SY01500 b

    where UPPER(a.COLUMN_NAME) in (''COMPANYID'',''CMPANYID'',''INTERID'',''DB_NAME'',''DBNAME'')

      and b.INTERID = db_name() and COLUMN_DEFAULT is not null

    and rtrim(a.TABLE_NAME)+''-''+rtrim(a.COLUMN_NAME) <> ''SY00100-DBNAME''

    order by a.TABLE_NAME

    set nocount on

    OPEN G_cursor

    FETCH NEXT FROM G_cursor INTO @cStatement

    WHILE (@@FETCH_STATUS <> -1)

    begin

    exec (@cStatement)

    FETCH NEXT FROM G_cursor INTO @cStatement

    end

    close G_cursor

    DEALLOCATE G_cursor

    set nocount off'

    from SY00100

    exec (@Statement)

    end

    else begin

    declare @cStatement varchar(255)

    declare G_cursor CURSOR for

    select case when UPPER(a.COLUMN_NAME) in ('COMPANYID','CMPANYID')

      then 'update '+a.TABLE_NAME+' set '+a.COLUMN_NAME+' = '+ cast(b.CMPANYID as char(3))

      else 'update '+a.TABLE_NAME+' set '+a.COLUMN_NAME+' = '''+ db_name()+'''' end

    from INFORMATION_SCHEMA.COLUMNS a, DYNAMICS.dbo.SY01500 b

      where UPPER(a.COLUMN_NAME) in ('COMPANYID','CMPANYID','INTERID','DB_NAME','DBNAME')

        and b.INTERID = db_name() and COLUMN_DEFAULT is not null

      order by a.TABLE_NAME

    set nocount on

    OPEN G_cursor

    FETCH NEXT FROM G_cursor INTO @cStatement

    WHILE (@@FETCH_STATUS <> -1)

    begin

      exec (@cStatement)

      FETCH NEXT FROM G_cursor INTO @cStatement

    end

    close G_cursor

    DEALLOCATE G_cursor

    set nocount off

    end

    Thanks Frank!

    Kind regards,

    Leslie

  • Jim Lines Profile Picture
    4 on at
    RE: Selected Company Not Configured as a company....

    Thanks Leslie!

    I had a problem with this script and kept getting this error:  Incorrect syntax near 'G_cursor'. I think it may be something lost in my copy/paste.  I had success with this KB: support.microsoft.com/.../872370

    Based on the article in the first link you provided though, I'm hoping that the script in the KB is the latest.

    Thanks!

    Jim

  • L Vail Profile Picture
    65,271 on at
    RE: Selected Company Not Configured as a company....

    Thanks Jim,

    I changed the beginning of the script to:

    USE dynamics

    go

    and it worked perfectly. Hmm..  Just to be complete, here's the text of the script Jim uses :).

    if exists (select 1 from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = 'SY00100') begin

     declare @Statement varchar(850)

     select @Statement = 'declare @cStatement varchar(255)

    declare G_cursor CURSOR for

    select case when UPPER(a.COLUMN_NAME) in (''COMPANYID'',''CMPANYID'')

     then ''update ''+a.TABLE_NAME+'' set ''+a.COLUMN_NAME+'' = ''+ cast(b.CMPANYID as char(3))

     else ''update ''+a.TABLE_NAME+'' set ''+a.COLUMN_NAME+'' = ''''''+ db_name()+'''''''' end

    from INFORMATION_SCHEMA.COLUMNS a, '+rtrim(DBNAME)+'.dbo.SY01500 b

     where UPPER(a.COLUMN_NAME) in (''COMPANYID'',''CMPANYID'',''INTERID'',''DB_NAME'',''DBNAME'')

       and b.INTERID = db_name() and COLUMN_DEFAULT is not null

    and rtrim(a.TABLE_NAME)+''-''+rtrim(a.COLUMN_NAME) <> ''SY00100-DBNAME''

     order by a.TABLE_NAME

    set nocount on

    OPEN G_cursor

    FETCH NEXT FROM G_cursor INTO @cStatement

    WHILE (@@FETCH_STATUS <> -1)

    begin

     exec (@cStatement)

     FETCH NEXT FROM G_cursor INTO @cStatement

    end

    close G_cursor

    DEALLOCATE G_cursor

    set nocount off'

     from SY00100

     exec (@Statement)

    end

    else begin

     declare @cStatement varchar(255)

     declare G_cursor CURSOR for

     select case when UPPER(a.COLUMN_NAME) in ('COMPANYID','CMPANYID')

       then 'update '+a.TABLE_NAME+' set '+a.COLUMN_NAME+' = '+ cast(b.CMPANYID as char(3))

       else 'update '+a.TABLE_NAME+' set '+a.COLUMN_NAME+' = '''+ db_name()+'''' end

     from INFORMATION_SCHEMA.COLUMNS a, DYNAMICS.dbo.SY01500 b

       where UPPER(a.COLUMN_NAME) in ('COMPANYID','CMPANYID','INTERID','DB_NAME','DBNAME')

         and b.INTERID = db_name() and COLUMN_DEFAULT is not null

       order by a.TABLE_NAME

     set nocount on

     OPEN G_cursor

     FETCH NEXT FROM G_cursor INTO @cStatement

     WHILE (@@FETCH_STATUS <> -1)

     begin

       exec (@cStatement)

       FETCH NEXT FROM G_cursor INTO @cStatement

     end

     close G_cursor

     DEALLOCATE G_cursor

     set nocount off

    end

  • Sheri Ibbotson Profile Picture
    712 on at
    RE: Selected Company Not Configured as a company....

    Just a note:  I ran this new InterID script by selecting the database in SQL first and then Iran the script after the "go" command - this script resolved the "Selected Company Not Configured as a company.." error I was seeing when I logged into a newly created company in GP2015R2  - thanks again for the script

  • TD2012 Profile Picture
    943 on at
    RE: Selected Company Not Configured as a company....

    I did as Sheri and this removed the error when logging in to the company.  Although I did get a couple of errors on the script referencing UPR70105 and G curso, but it didn't terminate the script and test company seems to work ok.    The original script worked on GP2013 just fine until the 2015 year-end update, then I received the company configuration error.  Thank you!  A great help to find this when working on Sunday.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Community Member Profile Picture

Community Member 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans