Codeunit 80

It’s Friday Afternoon, It’s 4pm and I have got to look at codeunit 80 !! I have created a new document type in the Sales Header (t36) called Advertising and I have also created the tables that this new document type has to post to. The questions that I have is : Where in this codeunit should I begin ?? Is there any sections of this C/U that i should DEFINATELY make sure that I have added my code to?? Can anyone suggest a simple and proven method for doing this procedure ?? All suggestions welcome !

Hi Dean, The beggining step could be,Use the Find for “Document Type” ,you can see so many places different validations ,there either you can add your option to the existing options or you can write your own validations.For Ex. if you are invoicing then system will create Sales Invoice Header or Credit Memo Header depending on Document type there you can add your code for Advertisement to create Posted Advertisement header or you can write your validations. Same thing for the sales lines also ,If you are changing the GL Entries posting then you have to be carefull.I hope it will help you …If you need some more info.let me know… Thanks Mohan Babu

First of all, I REALLY would like to know, why even begin adding a new document type. As You mention you self, You now have to change CU80, But how about the tables and cudeunits Codeunit 80 uses. Basicly Codeunit 80 (and 90) only creates General Journals, Item Journals, Job Journals and then posts them. - Also some of the reports and forms are looking at document type. (posted and unposted) I’m not sure what You are trying to do, but if it was me, I guess that I would have done a seperate set of tables, and then do a codeunit to create the Sales Header (Order or Invoice). and then let standard Navision take care of the rest. Just my two cents:) /Henrik Edited by - hhelgesen on 2001 Aug 10 20:37:42