Select Specific Row in Subform via OnLookup

headley27
Member Posts: 188
I am navigating from a custom form to the Released Production Order Form (99000831).
The table that drives the custom form includes the following fields:
For example:
Is this possible?
Thank you,
headley27
The table that drives the custom form includes the following fields:
-
Prod. Order No.
-
Prod. Order Line No.
For example:
ProdOrder.RESET; ProdOrder.SETRANGE(ProdOrder."No.", "Prod. Order No."); IF ProdOrder.FIND('-') THEN BEGIN FORM.RUN(99000831, ProdOrder); >>>Some Code Here (Perhaps) To Jump To Subform Record (Prod. Order Line No.)<<< END;
Is this possible?
Thank you,
headley27
0
Answers
-
Declare the prod order form as variable. Instead of using filtering such as (SETRANGE and SETFILTER) use GET function, then pass the table to the FormVariable.SETTABLEVIEW.Navision noob....0
-
You will open the Form 99000831 and on this place the arrow on the selected line which is stored in your looked up field :?:
If yes, make a new function on Main form to pass the prod. order line and on Subform to get the order line.
declare the mainform (831) as variable. Call the new function on mainform and pass the prod order line. Then run the form. In OnAfterGet you call the new fundtion in subform the set the line. In the function in subform you set the filter to the line.
Also note, the user should not scroll through the Headers.
RegardsDo you make it right, it works too!0 -
Wouldn't it be easier to show the lines in the tablebox?
You might add some extra fields from the header on it.
This is the way standard Navision does it (e.g. function Get shipment lines in the sales invoice).Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Thank you everyone.
Garak put me down the right path. After I read his comments I remembered the PassParameters Codeunit that is referenced on Mibuso (as a download if I recall correctly).
After I passed the parameter between forms i used the following code which works perfectly.Form - OnAfterGetCurrRecord() IF ProdOrderLineNo <> 0 THEN GET(Status::Released, "Prod. Order No.", ProdOrderLineNo) ELSE ProdOrderLineNo := 0;
Thanks again!!
0 -
headley27 wrote:After I read his comments I remembered the PassParameters Codeunit that is referenced on Mibuso (as a download if I recall correctly).
http://www.mibuso.com/howtoinfo.asp?FileID=70
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