Tuesday, March 18, 2014

Lookup form on temp table

FORM.RunModal(FormID, MyRecord) vs MyForm.RunModal
For showing temporary records, my observation is that:
- FORM.RUNMODAL will allow a temporary record to show up correctly, but
- MyForm.RUNMODAL will only show the main table even if SETTABLEVIEW is issued with the temporary rec as the variable.
...
but this raises another issue to watch for: if the form identified by FormID is a tabular form with the LOOKUPMODE property set to FALSE and EDITABLE to Yes (look at F100 Accounting Periods, for instance, compare with F89 Job List), then you would need to either change the Form properties LOOKUPMODE to Yes and EDITABLE to No (bad idea! this is an invitation to problems due to unforeseen side-effects), or better yet, create a copy of the form in which the properties are set as appropriate for a Lookup Form and use that form instead.

No comments:

Post a Comment