If i make a temporary table out of the table Sales Line (Temporary Property=Yes), And insert some records in it.
Then how can i open the sales line form with these temporary records?
And also do some changes on them without Attain saving the records back to the "real database"?
I have looked for a property in the form that says like "use as temporary" or somthing. Anybody got a idea? :roll:
0
Comments
Anything is possible.... Either it's the correct or incorrect way to solve things...
Take a good look to form 6510, Item Tracking Lines, in Navision attain and higher. This form is based on a temp. table. Not exactly the sample you would like to have it, but hell...
How does it work? Well it's quite simple actaully... In theory! You will need to code the OnFindRecord and the OnNextRecord on the form.
BUT!!!!! Be carefull... Any changes made to other objects in Navision from the temp. object will be in the "REAL" database.
Sample: If I would validate a field in a temp. table and in OnValidate of this field programmed that a is created in the mutationlog (or any table) this record will not be in the temp. version of that record. It will be in the real database!
If it was hard to write, it should be hard to understand."
http://www.mibuso.com/forum/viewtopic.php?t=1485&highlight=temp
http://www.mibuso.com/forum/viewtopic.php?t=1457&highlight=temp
http://www.mibuso.com/forum/viewtopic.php?t=404&highlight=temp
If it was hard to write, it should be hard to understand."
1. A temporary table is reinitialized to null when it loses scope, which is a good reason NOT to make a temporary table local unless you are passing it as a referenced argument.
2. A temporary table does not keep it's value among different instance variables for the table. In other words, if a form calls functions in your table, and those functions invoke other form(s), and those forms use a record variable (other than one you pass by referenced argument, there is no association between the two distinct instances. Your record will be null.
3. I've also had problems reinitializing a temporary record, specifying different filters, and building a new recordset. It doesn't work. The FIND or GET calls always return FALSE. Maybe it was something I was doing wrong.
Hope this helps.
I disovered as you said .. it would be a monster code. So i did some work around and made some helping fields in the originale table.
Soon done and hope it work just the way i want it to! (It's allowed to dream is it not?) :whistle:
At least use a copy of the table, or am I saying something really bad here?
BTW, Ever made an array of temorary tables? It;s real fun and could be very usefull if only it worked. But there is a major bug in it somewhere... Don't know what bug anymore tho
If it was hard to write, it should be hard to understand."