init new record in form - AX 2009

Hi,

I have AX Form. I am creating new record. I would like to get information from lastest record from some field and copy it to field in new record. In which method should I paste code in form?

Regards

Jacek

You can do it in initValue() on the data source or the table.

You can do it initValue() method like tablename.fieldname = tablename.fieldname2 and if the record is changing you must use modified() method .