FirstOrNone<TResult> Method (IFilteredRecordCollection<TRecord>)
- Last UpdatedApr 08, 2026
- 1 minute read
Performs the function on the first record in the collection if it exists, ordered by ascending IRecord.RecordNumber, and returns the result. If the record does not exist, then None is returned.
Optional<TResult> FirstOrNone<TResult>(
Func<TRecord,Optional<TResult>> function,
LockType tableLockType,
LockType recordLockType
)
Optional<TResult^> FirstOrNonegeneric<typename TResult>
(
Func<TRecord^,Optional<TResult^>>^ function,
LockType tableLockType,
LockType recordLockType
)
Parameters
- function
- The Func to execute.
- tableLockType
- The TRecord table lock type for the scope of the function.
- recordLockType
- The TRecord record lock type for the scope of the function.
Type Parameters
- TResult
- The return type.
Return Value
The result of function if a record was found; otherwise None.