Parameter in codeunit

Blizzard
Member Posts: 9
Hi folks,
I want to adjust a parameter in a standard codeunit of Navision that is on the OnRun trigger, but it appears to be non editable. Is it possible to modify it anyway and if yes, how please?
Thankx
I want to adjust a parameter in a standard codeunit of Navision that is on the OnRun trigger, but it appears to be non editable. Is it possible to modify it anyway and if yes, how please?
Thankx
0
Comments
-
No, this is not possible.
You can call a codeunit with a Record only.
If you want to use a parameter you need to create a new function withing the codeunit and define the codeunit as variable before you call it.0 -
or use a record variable that has a field of the datatype that you need
.
0 -
Yes, you can do that, but please not with a standard NAV codeunit. You can mess things up terribly.0
-
of course
it is much easier to screw it up than to do it right.
Typically, you would only do CODEUNIT.RUN if you have a legitimate record variable to send. If you don't then you write a function (or more precisely a 'procedure') that can accept your parameters.
You could also write some functions to set global variables from another object. Then you create your codeunit as a global codeunit variable, and you call those functions. Then after the globals are set you call codeunit.RUN.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