---
title: "addMemberRecord(_:)"
framework: opendirectory
role: symbol
role_heading: Instance Method
path: "opendirectory/odrecord/addmemberrecord(_:)"
---

# addMemberRecord(_:)

Adds a member record to this group record.

## Declaration

```swift
func addMemberRecord(_ inRecord: ODRecord!) throws
```

## Parameters

- `inRecord`: The member record to add.

## Discussion

Discussion This method produces an error if this record is not a group record, or if inRecord is not an appropriate type. note: In Swift, this method returns Void and is marked with the throws keyword to indicate that it throws an error in cases of failure. You call this method in a try expression and handle any errors in the catch clauses of a do statement, as described in Error Handling in The Swift Programming Language and About Imported Cocoa Error Parameters.

## See Also

### Managing Group Records

- [isMemberRecord(_:)](opendirectory/odrecord/ismemberrecord(_:).md)
- [removeMemberRecord(_:)](opendirectory/odrecord/removememberrecord(_:).md)
