✏️ Explanatory Question
The initValue() method is a standard method of a form data source. While you're inserting a new record, initValue() can help you initialize field values. This method is called when a new record is created.
Example
You have a custom form with a table named TrainingMaster. The table has a date field named TrainingDate. During the creation of a new record, the TrainingDate field should be initialized with today’s date.
The coding pattern can be as follows:
[DataSource]
class TrainingMaster
{
public void initValue()
{
super();
TrainingMaster.TrainingDate = today();
}
}