LDAP.AddRecord
--------------

Adds an entry to a tree.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [LDAP](component_LDAP.md) | [7.0](newinversion70.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No |

### Deprecated

This function was [deprecated](deprecated.md). Use [LDAP.AddJSON](LDAPAddJSON.md) instead.

MBS( "LDAP.AddRecord"; LDAPRef; DN; Type...; Value... ) 

**MBS**( **"LDAP.AddRecord";** /\* Adds an entry to a tree. \*/  
**$LDAPRef**; /\* The reference number for the LDAP connection.e.g. $ldap \*/   
**$DN**; /\* The name of the entry to add. \*/   
**$Type...**; /\* The name of the attribute to add. \*/   
**$Value...**) /\* The value for the attribute. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| LDAPRef | The reference number for the LDAP connection. | $ldap |
| DN | The name of the entry to add. |  |
| Type... | The name of the attribute to add. |  |
| Value... | The value for the attribute. |  |

### Result

Returns OK or error.

### Description

Adds an entry to a tree.  
The parent of the entry being added must already exist or the parent must be empty (equal to the root distinguished name) for an add operation to succeed.  
This version of the Add can add several keys and values with simple text values.  
So please pass as many parameters as you need, always with key and value.  
  
Deprecated. Please use [LDAP.AddJSON](LDAPAddJSON.md) instead.  
  
This function takes variable number of parameters. Pass as much parameters as needed separated by the semicolon in FileMaker.  
Please repeat Type and Value parameters as often as you need.  
### Examples

Add two values:

 MBS ( "[LDAP.Add](LDAPAdd.md)"; $ldap ; "test"; "cn"; "Hello"; "fn"; "World" )  
### See also

- [LDAP.Add](LDAPAdd.md)
- [LDAP.AddJSON](LDAPAddJSON.md)

### Release notes

- **Version 10.1**
    - Deprecated [LDAP.Add](https://www.mbsplugins.eu/LDAPAdd.shtml), [LDAP.AddList](https://www.mbsplugins.eu/LDAPAddList.shtml), [LDAP.AddRecord](https://www.mbsplugins.eu/LDAPAddRecord.shtml) in favor of [LDAP.AddJSON](https://www.mbsplugins.eu/LDAPAddJSON.shtml).
- **Version 7.0**
    - Added [LDAP.AddRecord](http://www.mbsplugins.eu/LDAPAddRecord.shtml) and [LDAP.ModifyRecord](http://www.mbsplugins.eu/LDAPModifyRecord.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin, version 10.1pr6](https://www.mbsplugins.de/archive/2020-03-02/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 7.0pr2](https://www.mbsplugins.de/archive/2017-01-09/MBS_FileMaker_Plugin_version_7/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 5th January 2017 , last changed 5th June 2021

  
[LDAP.AddList](LDAPAddList.md) - [LDAP.Bind](LDAPBind.md)

[HTML Version](LDAPAddRecord.shtml)