Form.run and RefRef

garak
Member Posts: 3,263
Hy,
i'm right, that it is not possible to open a form.run(21,RecRef) based on RecRef :?:
Has somebody an idea why not:?:
The only solution that i have:
Regards
i'm right, that it is not possible to open a form.run(21,RecRef) based on RecRef :?:
Has somebody an idea why not:?:
The only solution that i have:
//FieldFilter is a temp table which includes the Filter for every field IF NOT FormRunModal(TableNo,FieldFilter) THEN BEGIN ... end; FormRunModal(TableNo : Integer;FieldFilter : Record) CASE TableNo OF DATABASE::Customer: BEGIN Cust.RESET; //select here the fields an the used filter ... FORM.RUNMODAL(0,Cust); END; ... end;
Regards
Do you make it right, it works too!
0
Comments
-
-
:idea: i have found an Solution. The only negative is: you must know the form id that you will run. But you dosn't need for every Record a Variable. You must only know which formno you will run for which RecRef table instance.Do you make it right, it works too!0
-
garak wrote::idea: i have found an Solution. The only negative is: you must know the form id that you will run. But you dosn't need for every Record a Variable. You must only know which formno you will run for which RecRef table instance.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
You need to base a form on a recordRef, isn't it? It depends on what you want. There isn't a single solution. For example I recently released a form based on a temporary table of the field table. It accept the tableID as input and then it works like a Report RequestForm only that it works for every table. When you close the form you have your RecordRef filtered. If you want something different such as a form based on EVERY table, I guess that it could be done as follows:
1) You must create a table with the number of fields you want to show.
Its fields are text fields.
The point is the fields you want to show on the form. Suppose the first 5 of the table or something like that. Or you can see some fields that you can set via code using a temporary table of Field table.
2) You create a form based on that table.
3) On OnInit trigger you can write code to copy all records you want to see on a temporary table of the actual Form "Rec", using obviously the Format(fieldRef.value()); Be careful that you must write a loop on the field table to set the value for every field.
4) You can write code on the OnFindRecord and OnNextRecord to substitute Rec (that's a real empty table) with the temporary table. You can find how on the Where-Used form.
Then you set the caption using the Field table and it's done.
Clearly this form must be run after some setting function and so using a variable, not "form.run(formID)".
I think it will work.
If you need to run an existing form you obviously can't do that because it's based on an existing table and the only way to manage is to use "CASE" as you said.I don't envy anybody who caught up his aim. I travel gladly.0 -
I will post the Solution ( for RecRef an Form.run(ID,Record) under tips & tricks
RegardsDo you make it right, it works too!0 -
Hi there,
I posted another solution for this problem to http://www.mibuso.com/forum/viewtopic.php?p=41023
Have fun!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