Temporary Record and then saving it
andy76
Member Posts: 616
Hello,
I am cycling on a record (Reservation Entry) to find some information with repeat until...I have to split a couple in a lot of couples but I don't want that new couples came taken by my first cycle otherwise it becomes an infinite loop.
So I though to declare a new record variable on Res. Entry with flag Temporary and insert new records there.
At the end of all my processing (Report - on Post Report) I want to save all the records on my Temporary record variable in the real Res. Entry table.
Is that possible? riskious? How do I have them ? Do I have to cycle?
Or is better to create a new table identic to Res.Entry and then transfer from that?
Thank you very much
Andy
I am cycling on a record (Reservation Entry) to find some information with repeat until...I have to split a couple in a lot of couples but I don't want that new couples came taken by my first cycle otherwise it becomes an infinite loop.
So I though to declare a new record variable on Res. Entry with flag Temporary and insert new records there.
At the end of all my processing (Report - on Post Report) I want to save all the records on my Temporary record variable in the real Res. Entry table.
Is that possible? riskious? How do I have them ? Do I have to cycle?
Or is better to create a new table identic to Res.Entry and then transfer from that?
Thank you very much
Andy
0
Comments
-
You're doing it the correct (and fastest) way.
-looping the real table and saving your data in a temptable
-after the loop : saving the temptable in the real table.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Thank you
But what is the correct/better way to save the temporary record to real table?
Transferfields or INSERT with loop or ....?0 -
You have to loop your temptable. There is no other way to read all records from the temptable.
How to transfer the data. This depends. If for example you need to create records in Sales Lines,Item Journal Line,... you best create your temptable assigning ONLY the necessary fields. Then create the real table and VALIDATEing the values in the real table.
If you have some table in which there are no triggers, you can just dorecRealTable := tmpTempTable; recRealTable.INSERT(FALSE);
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 328 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