TryFirst Method (IFilteredRecordCollection<TRecord>)
- Last UpdatedApr 08, 2026
- 1 minute read
Performs the action on the first record in the collection if it exists, ordered by ascending IRecord.RecordNumber, and returns true. If the record does not exist, then false is returned.
bool TryFirst(
Action<TRecord> action,
LockType tableLockType,
LockType recordLockType
)
bool TryFirst(
Action<TRecord^>^ action,
LockType tableLockType,
LockType recordLockType
)
Parameters
- action
- The Action to execute.
- tableLockType
- The TRecord table lock type for the scope of the action.
- recordLockType
- The TRecord record lock type for the scope of the action.
Return Value
true if a record was found; otherwise false.