Release 5 supports temporary tables in forms.
I thought this would enable me to open a list form and then populate the table and display it, plus rebuild the table on the fly.
Through debug, I can tell it is inserting new records, but nothing shows up in the list form.
Has anyone used this new property and made a list form work with a temp table just like a normal table?
0
Comments
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
So if I am going to change filters and delete and recreate the temp table, I am going to have to do that from a different form each time, then run the form with the temp table.
Currently, I have everything in one form where I am rebuilding the temp table based on filter changes on the form, but it won't allow the user to mark records, because it is doing the current record substitution to display the temp table records.
I was hoping for an all in one solution.
I guess I can try building the temp table once and then apply the various filters to it instead of rebuilding it each time.
Do you know what the sourcetabletemporary property does differently?
http://mibuso.com/blogs/davidmachanick/
triggerrs OnFindRecord and OnNextRecord.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
How and where are you populating the table? I am using this new functionality and it works fine. I am populating the Rec table on the "OnOpenForm" trigger.
-- Alejandro --
I was not specifying Rec, but I changed the code to specifically use Rec - still see nothing on the list form.
Did you make any other changes?
http://mibuso.com/blogs/davidmachanick/
I am going to try building this form from new.
I modified a form I had working in release 4 so I could let the user mark records. I got rid of all the old code for substituting Rec - maybe I missed something.
http://mibuso.com/blogs/davidmachanick/
-- Alejandro --
Even empty code in the record retrieval triggers causes the normal actions not to take place.
http://mibuso.com/blogs/davidmachanick/
Its not really "new" functionality, just a different way than you did this in earlier versions.
in earlier versions of Navision you could pass a Temp var as a parameter to a FORM.RUNMODAL command in which case you didn't need to write any code on the OnNext and OnFind triggers.
This was actually the First error that I officially logged with Navision as an error in Financials. I was trying to use a temp table in a form and back then there were no existing forms (like Location Qty) to copy, I had tried lots of things, and eventually commented them out to get back to normal and it all stopped working. The answer came back from Denmark "Read the manual (aka on line help)".
So if you read it literally it says "any code in this trigger replaces the built in functionality", and of course // is still code, just code that does nothing, so the run time simply sees that there is code there, so it does not run the built in NEXT and FIND functions. Its called Danglish I think.
http://mibuso.com/blogs/davidmachanick/
I tried to fill up the rec in the OnAfterValidate trigger of a variable on the form, but after this Navision always tried to insert a new record (with the contents of my last record in the temptable).