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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

How can I change Company ID

(0) ShareShare
ReportReport
Posted on by 40

Hi Guys. I am preparing a base database that includes all the customization which we will be using for 10 companies. But, my problem is I need to change the company id for each company. Is it possible to create just one application and system database that I can use for 10 companies and just restore it to another database name for another company and change the company Id? If yes, may I know all the tables that I need to update the company id? Is it safe to do this? 

Thanks.

*This post is locked for comments

I have the same question (0)
  • Nayan Mansinha Profile Picture
    1,245 on at

    If I understood correctly your question:

    "You have customizations that you want to apply to 10 different companies"

    then, I would suggest the following:

    1) Export out all the customizations using Export Customizations (91.500.00) screen and then

    2) Import them in (using 91.510.00) all the other companies.

    HTH

    Nayan

  • catherine chua Profile Picture
    40 on at

    Hi Nayan,

    Thanks for the reply. I can do that but there are customized tables, stored procedures, functions & triggers and PV list involve in the customization. Is there a simple way or scripts to get all the customized table, store procedure, functions and triggers?

    Thanks

  • Suggested answer
    Jeff Trotman Profile Picture
    275 on at

    If you run this in your application database, it will show you every table/field combination that has CpnyID as part of the field name, which is probably pretty close to what you are looking for.

    select o.Name, c.Name
    from sys.columns c inner join sys.objects o on c.object_id = o.object_id
    where o.type = 'U' and c.name like '%CpnyID%'
    order by o.Name

    Having said that, regarding your question about "safe" - I would definitely say you do what you are suggesting at your own risk.  If you are not very comfortable with the SL database structure, I would say you probably don't want to do this.

    I think the "safe" option would be to use a SQL tool that will find differences in databases and will script out the differences.  You could set up an "out of the box" database and compare it to your customized one and let it generate the scripts for the differences and then apply that to the other 9.  That's probably the safe way to go.

    APEX, Embarcadero, and Quest (off the top of my head) make these kind of tools.  I've had good luck with this one - http://www.sql-server-tool.com/?src=sct#rd0. It's cheap and not as powerful, but will do what I'm talking about here.

    Another option is to use the Professional Service Tools Company ID modifier, but it would only change values in the standard SL tables, not your custom tables.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics SL (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans