Code Unit

hi all,

I’m using Navision 3.70 and a newbie in Navision

I want to ask about codeunit, if i create a new code unit should we register the codeunit ? The Licence for Codeunit is 15 and there’s only 3 Codeunit that already develop.

Could you tell me how to do it ?

Thx b4

There is no such thing as registering the codeunit. You can use the new codeunits as per your license.

Hi Imran,

If you say we don’t have to register a new code unit, why we always get message “You do not have permision to run the ‘xxx’ codeunit. Contact the system manager if you need to have your permission changed.” when we run it.

thx for your advice.

There can be two things, either the user doesn’t have the permission of running the codeunit or the licence doesn’t permit.

The code unit has to be the number that you are licensed for. You will have received a CFG file with your FLF file, and this will tell you which numbers are licensed.

In anycase, it looks like you have purchased the Appliction Builder granule (7,200) which will give you access to codeunits from 50,000 thru 50,099 so try using one of those numbers.

Hi,

As I mention before in our licence there was Application Object - Codeunit … 15, and when I check in Object Designer - Codeunit there only 5 code unit 50001…50005 …

Is there something that I don’t understand about the licence, If the licence doesn’t permit what should type of licence should I buy ??

Or if the user doesn’t have permission is it right to set on the security - roles - permision ???

is there anything that I should set too ??

Could you give me a clue ?

Thx a lot for your advice

Lets start from the begining.

1/ Are you a Partner or a Customer?

2/ If you are a partner then is the error with your license or the customers license

3/ If you are a customer then you MUST have purchased granule 7,200 so why don’t you have access to the 50,000 thru 50,099

4/ Most important WHAT IS THE NUMBER of the code unit that you created.

  1. I’m a customer

  2. It’s true that i cannot access code unit 50.000-50.099, I only can see that there is Code Unit 50,001, 50,002, 50,003, 50,004, 50,005

  3. I don’t create code unit, the code unit was created by vendor who develop at the first time.

There was a Sales Order form that doesn’t use and where a press a button Approve (look like a custom form n button) there was a error like i said before.

So according your explantion, I should buy granule 7,200 if I want to access 50,000 thru 50,099.

One last Question : Why the code unit which made by vendor (50,001 …50,004) can be use in our system ?? But last code unit 50,005 cannot be use and I receive an error message ??

OK, now its all clear.

In you first post you asked:

But it was not you, I asked about granule 7,200 because that is what you would have needed if YOU had created the codeunit.

In this case, basically your Partner did developement but forgot to test it with you real license. Which is extremely bad development practice.

What you need to do is purchase CodeUnit 50,005. Or if you think you will be doing a lot more customizations you might want to buy 100 which is more economical.

You DO NOT need to buy granule 7.200.

Hi

I would add a few words to what David already said. You said you have a license for 15 codeunits, only 5 custom codeunits used, but you can’t run codeunit 50,005. I think you need to point this out to your vendor. They just forgot to have the last codeunit number they used activated in your license.

The license for custom object works in two steps:

  1. You plan to need a number of objects, say 20 tables, 50 forms, 50 reports, 10 codeunits; so you submit a purchase order to Microspft for 20 tables, 50 forms, 50 reports, 10 codeunits. In this order you are talking about “number” of objects as quantity, not as codes.

  2. Your vender develops the objects. Object numbers, intended as object codes, must be assigned. A request for specific object numbers must be submitted to Microsoft. You don’t need to pay any fees for that, since you already own the objects. You only are telling Microsoft that you are about to use table no. 50,001, form no. 50,000, codeunit no. 50,005, etc…

I think your vendor didn’t go through step 2 for this new codeunit.

It might seem logical to go through both steps at the same time, but many vendors do prefer to activate objects numbers as they are needed, since they think that it would easier to reuse pieces of software already developed for other customers with similar needs.

I see… Your explanation make everything clear now, so all i have to do if i want to use codeunit 50005, is call the vendor to submitted that codeunit to Microsoft. Thanks a lot for all your explanation (to : Mr. David and Ms. Anna).

Thanks

I see… Your explanation make everything clear now, so all i have to do if i want to use codeunit 50005, is call the vendor to submitted that codeunit to Microsoft. Thanks a lot for all your explanation (to : Mr. David and Ms. Anna).

Thanks again