# NAV 5.0 SP1 Italian - Problem with Activity Code

**URL:** <https://www.dynamicsuser.net/t/nav-5-0-sp1-italian-problem-with-activity-code/19756>\
**Category:** User Forum\
**Created:** [August 12, 2008, 3:27pm UTC](https://www.dynamicsuser.net/t/nav-5-0-sp1-italian-problem-with-activity-code/19756 "2008-08-12T15:27:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![davcic](https://avatars.discourse-cdn.com/v4/letter/d/a5b964/32.png) [@davcic](https://www.dynamicsuser.net/u/davcic)\
**Post date:** [August 12, 2008, 3:27pm UTC](https://www.dynamicsuser.net/t/nav-5-0-sp1-italian-problem-with-activity-code/19756/1 "2008-08-12T15:27:02Z")

</div>

Hello!

My company is trying the Italian version of NAV 5.0 SP1.

We found that a new field has been added in several places: Activity Code (Codice Attività), which is mandatory when posting invoices. Its occurrences are quite frequent, so I was wondering what it’s meant for. This question arises because of a “small” issue: we upgraded from NAV 4.0, so there are a lot of previous data without any associated activity code. This in turn prevents the VAT from being calculated properly (lines without the code seem to be simply ignored).

Is there a quick way to provide a default value when posting data? Is there a way to get the right VAT results even for the previous data?

Thank you very much!

---

<div class="post-metadata">

**Author:** ![Anna\_Perotti](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@Anna\_Perotti](https://www.dynamicsuser.net/u/Anna_Perotti)\
**Post date:** [August 12, 2008, 5:44pm UTC](https://www.dynamicsuser.net/t/nav-5-0-sp1-italian-problem-with-activity-code/19756/2 "2008-08-12T17:44:20Z")

</div>

> [@](#):
>
> Hello!
> 
> My company is trying the Italian version of NAV 5.0 SP1.
> 
> We found that a new field has been added in several places: Activity Code (Codice Attività), which is mandatory when posting invoices. Its occurrences are quite frequent, so I was wondering what it’s meant for. This question arises because of a “small” issue: we upgraded from NAV 4.0, so there are a lot of previous data without any associated activity code. This in turn prevents the VAT from being calculated properly (lines without the code seem to be simply ignored).
> 
> Is there a quick way to provide a default value when posting data? Is there a way to get the right VAT results even for the previous data?
> 
> Thank you very much!

Alas! Microsft Italy misunderstood a change in the Italian VAT law (now abrogated! [6] ) and did a mess. The code is happily useless. We usually kill it as soon as we get a new 5.1 installation started. [:P]

---

<div class="post-metadata">

**Author:** ![davcic](https://avatars.discourse-cdn.com/v4/letter/d/a5b964/32.png) [@davcic](https://www.dynamicsuser.net/u/davcic)\
**Post date:** [August 14, 2008, 8:10am UTC](https://www.dynamicsuser.net/t/nav-5-0-sp1-italian-problem-with-activity-code/19756/3 "2008-08-14T08:10:11Z")

</div>

> [@](#):
>
> We usually kill it as soon as we get a new 5.1 installation started.

Thanks for the quick reply, I guessed something similar, but I wondered how you actually “kill” the field: I’ve seen there are a lot of occurrences in code and tables: do you simply comment all of them, or is there a single point where one can, for example, provide a default value?

Thank you very much again!

---

<div class="post-metadata">

**Author:** ![Anna\_Perotti](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@Anna\_Perotti](https://www.dynamicsuser.net/u/Anna_Perotti)\
**Post date:** [August 14, 2008, 11:37am UTC](https://www.dynamicsuser.net/t/nav-5-0-sp1-italian-problem-with-activity-code/19756/4 "2008-08-14T11:37:22Z")

</div>

> [@](#):
>
> > [@](#):
> >
> > We usually kill it as soon as we get a new 5.1 installation started.
> 
> Thanks for the quick reply, I guessed something similar, but I wondered how you actually “kill” the field: I’ve seen there are a lot of occurrences in code and tables: do you simply comment all of them, or is there a single point where one can, for example, provide a default value?
> 
> Thank you very much again!

I’m telling by memory, since I’m at home, right now, but I think it’s just:

- comment TESTFIELD(“Activity Code”) in codeunits 12, 414, 415

- change NotBlank property in table 12124, field Code to No and insert a blank code

---

<div class="post-metadata">

**Author:** ![Anna\_Perotti](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@Anna\_Perotti](https://www.dynamicsuser.net/u/Anna_Perotti)\
**Post date:** [August 14, 2008, 3:04pm UTC](https://www.dynamicsuser.net/t/nav-5-0-sp1-italian-problem-with-activity-code/19756/5 "2008-08-14T15:04:21Z")

</div>

> [@](#):
>
> tables: do you simply comment all of them, or is there a single point where one can, for example, provide a default value?

If you like the default solution better, you may add a function to tables 36 and 38 which reads the first (and only) record in table 12124 and returns the code value, then in the InitRecord function add a line like this:

“Activity Code” := GetActvityCode;

---

<div class="post-metadata">

**Author:** ![davcic](https://avatars.discourse-cdn.com/v4/letter/d/a5b964/32.png) [@davcic](https://www.dynamicsuser.net/u/davcic)\
**Post date:** [August 18, 2008, 11:00am UTC](https://www.dynamicsuser.net/t/nav-5-0-sp1-italian-problem-with-activity-code/19756/6 "2008-08-18T11:00:57Z")

</div>

Thank you very very much, I’ll definitely verify both soutions, just to know pros and cons for the next time! 🙂
