Newbie Developer Needs Advice

Hi, I am about to start work on my first Navision customisations and would like a little advice on best practices, particularly regarding modifying existing objects. For example, I need to add a field to the sales invoice header table. Is it best practise to simply add a new column to the sales invoice header table, or copy the table to a new object and use that (which would surely cause a lot of other work to be required), or create a new ‘custom invoice fields’ table with the same key etc. I was thinking for tables it’s probably best to add fields to the existing object, but when changing forms/reports it’s best to copy the object and change that. Therefore you can have a different sales invoice header form for each project. Any help appreciated. Jonathan

you add fields to the existing… but on your own number series… most common is using the 50000 series. you usually also change the original forms… each customer problably want to modify the forms anyway

By making a copy of an existing table in order to add fields to it will cause you more trouble and confusion, thus my advise is: FORGET IT! :slight_smile: You have better to add your new fields in then existing tables. As far as forms are concerned if you want to make major changes to a form (more than just adding few new fields) is better to make a copy of the form and modify the copy. Finally don’t forget to write any changes you make for the existing objects in the Documentation Trigger of the object you are modifying. It will make your life easier later… (trust me!) :-))) Good luck.

Many thanks for the comments. Jonathan

See also the last posting at: http://www.navision.net/forum/topic.asp?TOPIC_ID=9080

When you add fields to sales header records, also add the same fields to posted shipments and posted invoices. The posting routines will automatically copy any data to the historic records.

quote:


Originally posted by Navicons
When you add fields to sales header records, also add the same fields to posted shipments and posted invoices. The posting routines will automatically copy any data to the historic records.


This will only work if you give the field the same number in all tables.

quote:


Originally posted by DenSter

quote:


Originally posted by Navicons
When you add fields to sales header records, also add the same fields to posted shipments and posted invoices. The posting routines will automatically copy any data to the historic records.


This will only work if you give the field the same number in all tables.


The easiest way is to just copy/paste the field. No chance for mistakes then!

quote:


The easiest way is to just copy/paste the field. No chance for mistakes then! -------------------------------------------------------------------------------- Nelson Alberto


Well, not unless there’s code behind the fields [8D]

quote:


Originally posted by Steffen Voel

quote:


The easiest way is to just copy/paste the field. No chance for mistakes then! -------------------------------------------------------------------------------- Nelson Alberto


Well, not unless there’s code behind the fields [8D]


Then it would become a nice “feature” on the software… [:D] (if it even compiled, of course)