Temp. Table transfer to a form

twc
Member Posts: 28
Hello
I have modified the line:
in the following ones:
That beacuse I need to transfer the Item to the Form lfo_CalculationCard2.
lre_CalcLineTemp is a temporary table.
The code of fu_SetInfo is:
The question is: Why the form does lose all the informations in the temp. table pre_CalcLineTemp?
Which would be the right code?
Thanks and Cheers!
Tommaso
I have modified the line:
FORM.RUN(FORM::"Calculation Card 2", lre_CalcLineTemp);
in the following ones:
lfo_CalculationCard2.fu_SetInfo(lre_CalcLineTemp,pre_Item); lfo_CalculationCard2.RUN;
That beacuse I need to transfer the Item to the Form lfo_CalculationCard2.
lre_CalcLineTemp is a temporary table.
The code of fu_SetInfo is:
fu_SetInfo(VAR pre_CalcLineTemp : TEMPORARY Record "Calculation Line";VAR pre_Item : Record Item) Rec := pre_CalcLineTemp; re_Item := pre_Item;
The question is: Why the form does lose all the informations in the temp. table pre_CalcLineTemp?
Which would be the right code?
Thanks and Cheers!
Tommaso
Tommaso Cereghetti
IT-Consultant
IT-Consultant
0
Comments
-
Withlfo_CalculationCard2.RUN;
You would have to program a function to receive all records and save them in a temptable in the form and then program "OnFindRecord", "OnNextRecord" to use the temptable.
The trick I would use is :lre_CalcLineTemp.RESET; lre_CalcLineTemp.SETRANGE("Some Code Field",pre_Item."No."); FORM.RUN(FORM::"Calculation Card 2", lre_CalcLineTemp);
And in the form (trigger "OnOpenForm") I would put:re_Item.GET(GETFILTER("Some Code Field"));
This of course if you didn't change any fields in the record "pre_Item".
In case you have changed some fields, you have to send them in the same way as the item no. OR use a Singleinstance codeunit to put the pre_Item in before calling the form and in the form get the record (see http://www.mibuso.com/howtoinfo.asp?FileID=9 )Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Grazie mille! Era proprio quello che mi serviva!
Buona serata,
TommasoTommaso Cereghetti
IT-Consultant0
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