<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: 10.6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "OpenDirectory",
  "identifier" : "/documentation/OpenDirectory/ODNodeCreateRecord(_:_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Open Directory"
    ],
    "preciseIdentifier" : "c:@F@ODNodeCreateRecord"
  },
  "title" : "ODNodeCreateRecord(_:_:_:_:_:)"
}
-->

# ODNodeCreateRecord(_:_:_:_:_:)

Creates a record in a specified node with specified properties.

```
func ODNodeCreateRecord(_ node: ODNodeRef!, _ recordType: String!, _ recordName: CFString!, _ attributeDict: CFDictionary!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>!) -> Unmanaged<ODRecordRef>!
```

## Parameters

`node`

The node.

`recordType`

The record’s type.

`recordName`

The record’s name.

`attributeDict`

A dictionary of key-value pairs representing attributes for the record. Can be `NULL`.

`error`

An error reference for error details. Can be `NULL`.

## Return Value

The created record.

## Discussion

The keys in `inAttributes` can be of type `CFStringRef` or one of the `ODRecordType` constants. The values in `inAttributes` must be of type `CFArrayRef`, containing elements of type `CFStringRef` or `CFDataRef`.

If any of the attributes in `inAttributes` fails to be set, the record is deleted and `outError` is set.

## See Also

[Record Types](/documentation/OpenDirectory/record-types)

Types of Open Directory records.

[General Attribute Types](/documentation/OpenDirectory/general-attribute-types)

Types of Open Directory attributes.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)