Dear all,
I have a Dynamics NAV 2009 SP1 database with some tables with the LinkedObject property set to True.
We have differents companies and we want to rename one of these. When we are renaming this company we get the following error:
We have tried to delete the views of the current company and create the new views of the new company name before rename the company. We have tried to create the new views of the new company name before rename the company. But always appear this error.
How can I rename the company???
Thanks and best regards!
Arseni Hernandez
0
Answers
2) In SSMS: Delete the views from the DB
3) In NAV: Export the table objects which are views and delete them from NAV
4) In NAV: Increase Object cache to at least 100 MB and rename the company
5) In SSMS: In the created scripts use "Find and Replace" to replace the old company name against the new one.
6) In SSMS: Execute the scripts - the views are recreated
7) In NAV: Import the saved objects
Done
FD Consulting
This is one way to rename a company, but I wanted to know if is possible to do without delete any object in Dynamics NAV.
Is there any way to do it more automatically?
Thanks and best reagrds,
Arseni.
A colleague once developed a solution in NAV which could do all of the above: Store the SQL views in a table, drop the views and recreate them (correct with the new company names), save the NAV objects in a table, delete the objects and restore the objects. Only the rename needs to be done manually.
Theoretically it is possible to program the company rename also but only MS knows why it takes ages to change the company name via code while it only takes 20 minutes when done manually. It must have something to do with the object cache:
Rename of any 1 company in a 220GB DB (out of 10 companies):
...............................Manually............By Code
Object Cache 32MB:....~8-9 hours........~8-9 hours
Object Cache 100MB:...~20 minutes.......~8-9 hours
FD Consulting
I've done it manually and it works well.
Thanks and best regards!