CreateRecord(Action<TRecord>) Method
- Last UpdatedApr 08, 2026
- 1 minute read
Creates a new record inside of the RealTime Database.
The populateRecordAction is executed prior to the record being written to the RealTime Database. All required key fields should be populated during this action (Name, Dataset).
The table must be unlocked when calling this.
int CreateRecord(
Action<TRecord> populateRecordAction
)
int CreateRecord(
Action<TRecord^>^ populateRecordAction
)
Parameters
- populateRecordAction
- The Action 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. |