The SourceTableTemporary is a new property introduced in 5.0 giving all kinds of new capabilities of showing data that is not even in the database. Instead of showing real data from the database, the form is running on an empty table when starting up, so you will have to populate it with data. Step 1. Create a normal form with the wizard and define your sourcetable. Select the columns you want to (ab)use. Make sure to select the SourceTableTemporary property. In our example we will use table 18, Customer and select columns No. and Name. Step 2. Create a new function "InitTempTable" In this function define a Local variable "Cust", type Record, Subtype 18. (Customer). Write the following piece of C/AL Code
Good posting. Thanks!
Greetings of the New Year 2011.
As you said that OnValidate trigger of controls in Forms excutes on REAL tables only. I tried, it works on Temporary Tables also.
Yes there is. But it is not neat.
For this to be functioning you need to change the OnModify trigger of the form.
Mind that, when entering data in the form, OnValidate code will be executed on REAL tables. Or is there any way to get around this?
Yes, NAV is really becoming a cool dev. environment - I've just notised that you can now use the TAB key to indent code - it's soooo flash :-)