Share |

Friday, July 21, 2006

Open form by defect

Know you that from C/AL can be opened the form by defect associated to a table? That is, with no need to know his ID. It is only necessary to indicate like parameter of function FORM.RUNMODAL (Number [, Record] [, Field]) a zero and variable of the record to treat.

For example:
recItem.SETFILTER("Gen. Prod. Posting Group", 'MERCADERIA');
FORM.RUNMODAL(0,recItem);
Using the variable recItem of type record and subtype Item and passing it as parameter we obtain that its form associated with the selected data is opened.