CreateRecord(Func<TRecord,Boolean>) Method
- Last UpdatedApr 08, 2026
- 1 minute read
Creates a new record inside of the RealTime Database.
The function is executed prior to the record being written to the RealTime Database. All required key fields should be populated during this action (Name, Dataset). To abort record creation, return false. To confirm record creation, return true;
The table must be unlocked when calling this.
int CreateRecord(
Func<TRecord,bool> function
)
int CreateRecord(
Func<TRecord^,bool>^ function
)
Parameters
- function
- The Func to configure the fields of the new record to create.
Return Value
The IRecord.RecordNumber of the new record that was successfully created, or 0 if the record was not created.
| Exception | Description |
|---|---|
| OASySDNA.RealTime.Data.Common.Exceptions.TableLockedException | A record creation was attempted on a locked table, indicating the record was not successfully created. |