Compilation bug in Navision 4.02

I want to share with you some of my experiences while compiling multiple objects in Navision 4.02. It seems that particularly this Navision version is not correctly using Object Cache while one is compiling multiple objects in Object Designer. If the object (table/report/etc) is stored in Object Cache, during the multiple object compilation, Navision restores the cache to object, thus discarding all changes which were made to the object by another user on the same database since the object was stored in Object Cache. This can be demonstrated with the following scenario: 1. Open two Navision Clients for the same database. Lets call them Client A and Client B. 2. On Client A run and close Table 79 “Company Information”. This action stores Table 79 to Object Cache. 3. On Client A in Object Designer select tables 70…85. Press F11 to be ready to compile them. 4. On Client B, open Table 79 “Company Information” and make some changes. Save the object and close it. 5. On Client A press Yes in compile dialog. All objects will be compiled and ALL CHANGES in T79 will be DISCARDED. Object Name, Versions, Date and Time will be restored from Object Cache of Client A. Changing “Object Cache (KB)” property to “0” does not help. In previous versions of Navision there was no such problem. I have contacted MBS for support due to this issue, but the answer was the following:

After such a reply I looked through the Navision development documentation and found that this is absolute truth. According to official development guidelines, Navision C/SIDE is not designed to multi-environment development. Despite that, many companies are making development changes in one database, especially when it is working with big projects. So, rhetorical question, is this really a feature of Navision or it is simply a bug? Especially keeping in mind that there was no such problem in previous versions of Navision :slight_smile:

I have worked with Navision since 1995 and I can assure you that this has been the behavior in the development environment since version 1.0. It has always been a problem.

Never a problem if you know about it.

The solution is for each developer to know what the others are working on and NEVER use the group compile.

Multiple developers means more dicipline and a team leader who makes sure that there are no conflicts, no 2 developers should be working on the same object at the same same time time in any case.

I have seen this happen…and when i was workign on the my database , no body was connected to it, beign my test database and I had 2 different databases open just for comparison.

I made changes to a custom table complied it and stored it and then I went into the design of some other table in other databse 2…to check soem property…

Came back to my original databse 1, and ran the object that I amde changes to…got some error …and to my surprise my changes were gone and the object was stored with its original date (last uyear’s not todays) and time. Very Strange!!! huh

No way! I have tested the following situation with for ex. v3.60 and there is no such problem.

Its easy to say to never use group compile, but sometimes you desperately need to compile a number of objects, especially when you make a definition change in a sort of function which is used in many places of functionality (btw, this was the situation when we found this issue). So, what I do – I just restart navision before every group compilation if I know that somebody else is making development changes.

One safe option is to take a local backup, work on that and then check the live db when importing your changes. Get periodic object changes from the live db for your local version to keep track.

Discuss with others if you have conflicts.

You could use each developers initials in the Version info to help keep track.

The only safe way to work is to have a team leader who manages the changes and only one person who can do any multiple object compile and always at the end or beginning of each day.
Takes time to save time.

You should not work in one database with multiple developers at the same time for this reason. That is just a bad idea from many points of view.

In my experience, by far the best way to do team development in NAV is for all developers to have a local copy of the database and do their work in it. Then only upload objects from the local database to the master database when you have a compiled set of objects that doesn’t cause problems with other objects, so that each individual person can do system testing.

Every day every developer gets the latest objects from the shared database to keep his/her local database up to date with current modifications.

This demands discipline and rules that everybody follows consistently without question. When you run into a conflict (and you WILL run into conflicts) you work out the differences together. It only takes one jerk to screw up a project, so it is vitally important the all team members know what to do, and know to ask questions when they run into an issue.

A side effect of this method is that you always have fob files with your work. It is simply impossible to lose your work, unless you lose the fob files. Because you have the objects in a local copy of the database, nobody can overwrite them out of ignorance or laziness.

Said it better than me…but will they listen?

Ditto …

Navision Version Control! Top isn’t it! [:’(]

I had the same problem as first posted in 4.01W1 about 2 years ago. Object Cache set to zero, was on SQL. Not sure what was happening. We ended up doing regular backups.

On the question of compilation, when you do a full recompile do you regularly find that some objects will not compile. I know CU397 is a prime example of this.

I do a full recompile if i refresh my local from another database.