Call a codeunit from a Form

Sugeevishere
Member Posts: 11
Hi Mibuso Developers,
I want to call a Codeunit to the form using a button. I created a function call getsalesorder and i pass salesheader and salesline as the record variable parameters inside that function which is included inside the Sales Order codeunit. May I know the way of calling the codeunit to the form?
Any help will be appreciated.
I want to call a Codeunit to the form using a button. I created a function call getsalesorder and i pass salesheader and salesline as the record variable parameters inside that function which is included inside the Sales Order codeunit. May I know the way of calling the codeunit to the form?
Any help will be appreciated.
0
Answers
-
Declare the codeunit as a variable in form
and callcodeunit.GetSalesorder(Salesheader,SalesLine);
0 -
Thanx Mohana.
I just tried this earlier. But it does not got worked. So I thought It was wrong. Thats why I posted this question in the Forum. So I have to check my codeunit now. Thank You for your very kindful help.0 -
What is the source table of form?
If it is Sales header then you can send Rec as sales header and you need to get the right sales lines record and pass it..
Or you can get sales lines in Codeunit itself with help of header..
Check codeunit 80 and 900 -
I try to run the Codeunit through Form. But its giving me an error on (You must specify Gen. Bus. Posting Group in Customer No.=".)
What is the meaning of this error and How to solve it?
Any help will be appreciated.0 -
Sugeevishere wrote:I try to run the Codeunit through Form. But its giving me an error on (You must specify Gen. Bus. Posting Group in Customer No.=".)
What is the meaning of this error and How to solve it?
this is a standard error of setup
you should set Gen. Bus. Posting Group in customer card of Customer you are using in sales Header..
Contact your seniors for more help..these are basic setups..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