How to get selected Sales Line No.

upasanisandip
Member Posts: 405
Dear all,
I have a command button on Sales Order Form. Now I want the selected SalesLine."Line No.". When I click on command button on Sales Order Form it is giving me value 0.
Because of command button is on main form & sales line table is on subform. How to resoved this prob?
thanks,
sandip.
I have a command button on Sales Order Form. Now I want the selected SalesLine."Line No.". When I click on command button on Sales Order Form it is giving me value 0.
Because of command button is on main form & sales line table is on subform. How to resoved this prob?
thanks,
sandip.
0
Comments
-
Define a name for the subform.
Define a function on subform.
put MESSAGE(FORMAT("Line No.")) in the new function on the subform.
Under button call the function in the subform: CurrForm.SubformName.FORM.FunctionNameSubform;
Tino Ruijs
Microsoft Dynamics NAV specialist0 -
Thanks tinoruijs,
Your solution is perfect but I was finding solution without touching any standard code. I have tried to find out from standard codeunits where I will get salesline."line no." but not possible to get it.0 -
Well, isnt putting a new button on the sales form not standard code?
-a0 -
upasanisandip wrote:Thanks tinoruijs,
Your solution is perfect but I was finding solution without touching any standard code. I have tried to find out from standard codeunits where I will get salesline."line no." but not possible to get it.
I don't understand that way of thinking...0 -
tzzzz
Take a look behind the Button "Line" on Sales Order form. There are some standard functions and you can see, how you can get the selected Line.
Some things are very simple ;-) And you will see, the standard is using the same solution like tinoruijs tip
RegardsDo you make it right, it works too!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