Function

ODRecordSetValue(_:_:_:_:)

Sets one or more attribute values of a record.

Declaration

func ODRecordSetValue(_ record: ODRecordRef!, _ attribute: String!, _ valueOrValues: CFTypeRef!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>!) -> Bool

Parameters

inRecord

The record.

inAttribute

The attribute type to set.

inValueOrValues

The value or values. Can be of type CFStringRef or CFDataRef, or a CFArrayRef containing elements of type CFStringRef and CFDataRef.

outError

An error reference for error details. Can be NULL.

Return Value

true if the value or values are successfully set; otherwise, false.

Discussion

Passing an empty array for inValueOrValues deletes the attribute.

See Also

Working with Records

func ODRecordGetTypeID() -> CFTypeID

Returns the type ID for a record.

func ODRecordSynchronize(ODRecordRef!, UnsafeMutablePointer<Unmanaged<CFError>?>!) -> Bool

Synchronizes a record with the directory to get current data and commit changes.