> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# EabEntry

> Reads and writes entries from the email address book. The class is also used when you want to synchronize the address book using DBI.

Reads and writes entries from the email address book. The class is also used when you want to synchronize the address book using DBI.

## Constructors

### EabEntry()

```crmscript theme={null}
EabEntry
```

Initializes a new instance of the EabEntry class.

## Methods

## delete()

Deletes the current address book entry from the database.

```crmscript theme={null}
Void delete()
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

## getValue(String)

Gets the value of the given field in the EabEntry instance.

```crmscript theme={null}
String getValue(String field)
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The value of the field.

<Note>
  Available fields:

  * name
  * email
  * sms
  * folderId
  * dbi\_agent\_id
  * dbi\_key
  * dbi\_last\_syncronized
  * dbi\_last\_modified
  * dbi\_delete
</Note>

**Example:**

```crmscript theme={null}
EabEntry eab;
Bool b = eab.load(15);
print(b.toString());
eab.setValue("name", "test");
```

## load(Integer)

Loads an entry from the address book with the specified ID.

```crmscript theme={null}
Bool load(Integer id)
```

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - True if loading var successful; otherwise, false.

**Example:**

```crmscript theme={null}
EabEntry eab;
Bool b = eab.load(15);
print(b.toString());
```

## loadFromAgentAndKey(Integer,String)

Used in conjunction with DBI. Load an entry with the specified key from the specified agent.

```crmscript theme={null}
Bool loadFromAgentAndKey(Integer id, String key)
```

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - True if loading var successful; otherwise, false.

## save()

Saves the current address book entry. If you did not load an existing entry, a new entry will be created; otherwise, it will update the loaded entry.

```crmscript theme={null}
Integer save()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - ID of the saved entry.

## setValue(String,String)

Sets the value of the given field in the EabEntry instance.

```crmscript theme={null}
Void setValue(String name, String value)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

<Note>
  Available fields:

  * name
  * email
  * sms
  * folderId
  * dbi\_agent\_id
  * dbi\_key
  * dbi\_last\_syncronized
  * dbi\_last\_modified
  * dbi\_delete
</Note>

**Example:**

```crmscript theme={null}
EabEntry eab;
Bool b = eab.load(15);
print(b.toString());
eab.setValue("name", "test");
print(eab.getValue("name"));
```


## Related topics

- [Namespace CRMScript.Native](/en/automation/crmscript/reference/CRMScript.Native.md)
- [CRMScript Reference](/en/automation/crmscript/reference/index.md)
- [eab_entry table](/en/database/tables/eab-entry.md)
- [eab_folder table](/en/database/tables/eab-folder.md)
- [dbi_agent table](/en/database/tables/dbi-agent.md)
- [kb_entry table](/en/database/tables/kb-entry.md)
