Codeunit Error

rnjbng
Member Posts: 82
Hi -
I have a very simple codeunit 50010 in which I am just inserting a record into table 5071 Campaign. When I run this code I get an error
'You do not have the following permission on Codeunit Insert Campaign::Execute'
Now, In the
User table --->Permission Set-->I have Super assigned and the company field is left blank.
In Codeunit 50010 I went to permission and have given indirect permission of Read, modify, Insert and Delete.
In SQL I have DBowner, Sysadmin and all SUPER permission as per other forums description about this exact error message.
My question is can't I create any codeunit with a Partners Developers license and has something changed in NAV 2016 with regard to codeunit creation using Partners Developers license.
Any help is highly appreciated.
Thanks
RS.
I have a very simple codeunit 50010 in which I am just inserting a record into table 5071 Campaign. When I run this code I get an error
'You do not have the following permission on Codeunit Insert Campaign::Execute'
Now, In the
User table --->Permission Set-->I have Super assigned and the company field is left blank.
In Codeunit 50010 I went to permission and have given indirect permission of Read, modify, Insert and Delete.
In SQL I have DBowner, Sysadmin and all SUPER permission as per other forums description about this exact error message.
My question is can't I create any codeunit with a Partners Developers license and has something changed in NAV 2016 with regard to codeunit creation using Partners Developers license.
Any help is highly appreciated.
Thanks
RS.
0
Answers
-
Hi,
As far as I know (and in my own experience) nothing has changed in creating codeunits with 2016.
Have you tried in a fresh cronus?
Good luck.\\The truth exists in seven versions.0 -
Yes, even with Cronus I get the same error. One thing I noticed though is that if you create a codeunit within the customers license range then you don't get the error. You get this error only if you create a codeunit outside customers license range say the customer does not have license for codeunit 60001 and you create a codeunit 60001 using a developers license and run the codeunit you get the error.
Has Microsoft changed the developers license ability to create objects only within the customers license range. Not sure if this is true.
Thanks
RS.0 -
It's not a problem with creating the codeunit but a problem running it. Although you are creating the codeunit with the developers licence in the Dev environment, when you run the codeunit it is running using the license installed in the database I.e. the customers license.2
-
i am receiving this type error also. built a record insertion codeunit in the 50k range, tested it locally (direct copy of clients db) and it worked fine.
put it in the clients db (test db) and loaded our dev license, ran it and get the error "you do not have the following permissions on Codeunit xxxx::execute".
I have checked permissions, permission groups, running as same user in both databases as (SUPER)... even tried renumbering the object in the 60k, 70k, 80k and 90 range.
Kishorm, you say its the Customers licence...
When it runs, I look at the Help>About and it shows our dev license as being what its running with...
almost at wits end on this one...
Aaron
0 -
Additional comment: it MUST be some sort of license thing. My custom codeunit was numbered 50009 and would throw the error listed above.
BUT... I changed the codeunit number to 50005 and it ran fine...
rnjbng... try moving the codeunit to a lower number... *fingers crossed for you*0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions