Retrieving data from a form at run time.

I’m attempting to retrieve the projId from a form to build a tree object.

I’m currently trying to use element.args().record().getFieldValue(“PropertyDetails_ProjId”); to do this. (PropertyDetails_ProjId is the field name) but am receiving an error so I assume I’m doing something wrong. Can anyone advise me where I’m going wrong?

You need to define a variable to store the record, then access it that way.

ProjTable projTable = element.args().record();


info(strfmt("%1", projTable.projId));

I’ve attempted that and it’s not throwing errors but the buffer is not loading any information. Is there anywhere specific I need to run this code. At the moment I’m running it in init().