Class

Contact

Contact()

Contact information record for a user.

Constructor

# new Contact()

Properties:
Name Type Description
userid string

Unique user identifier

object_id string

Object id

object_type string

Object type ( res_user##CONTACT)

shortid string

Short id

createdon string

Creation date

updatedon string

Last update date

createdby string

Creator

updatedby string

Last updater

View Source infohub/User.js, line 36

Extends

Classes

Contact

Methods

# dump() → {void}

Print current object to console.

Overrides:

View Source infohub/cnObject.js, line 57

void

# get(key, defaultValueopt) → {*}

Retrieves a top-level member of the internal #_data object by key.

Common keys include: "info", "properties", "geometry", etc.

Parameters:
Name Type Attributes Default Description
key string

The name of the member to retrieve.

defaultValue * <optional>
{}

Value returned if the key does not exist.

Overrides:

View Source infohub/cnObject.js, line 104

The value of the specified member, or the defaultValue if missing.

*

# getAsJson() → {object}

Get object as JSON in COLNEO Generic Object Model format (cnGOM).

Overrides:

View Source infohub/cnObject.js, line 47

Object as JSON in GOM format (Generic Object Model)

object

# getId() → {string|null}

Get ID

Since:
  • 1.0, 09.2025, jh
Overrides:

View Source infohub/cnObject.js, line 78

Object ID, null if object is empty

string | null

# getPropertyValue(typeid, defaultValueopt) → {*}

Retrieves the value of a property from the internal json object.

Parameters:
Name Type Attributes Default Description
typeid string

The property key to retrieve.

defaultValue * <optional>
null

A fallback value returned if the property does not exist.

Overrides:

View Source infohub/cnObject.js, line 118

The property value if found, otherwise the defaultValue.

*

# getShortId() → {string|null}

Retrieves the short object ID from the internal json object.

Since:
  • 1.0, 09.2025, jh
Overrides:

View Source infohub/cnObject.js, line 91

The short ID if available, otherwise null.

string | null

# setFromJSON(contactopt) → {void}

Fill an existing contact with new data.

Parameters:
Name Type Attributes Default Description
contact Contact <optional>
{}

The contact data to update with

View Source infohub/User.js, line 54

void

# setFromJson(obj_as_data)

Set object from JSON in COLNEO Generic Object Model (GOM) format.

Parameters:
Name Type Description
obj_as_data object
Overrides:

View Source infohub/cnObject.js, line 36

# setPropertyValue(typeid, value)

Parameters:
Name Type Description
typeid string
value any
Overrides:

View Source infohub/cnObject.js, line 127

# toJSON() → {object}

Convert the contact info to a plain object.

View Source infohub/User.js, line 83

Plain object representation of the contact

object

# static createFromJSON(contactopt) → {Contact}

Create a new contact from saved data.

Parameters:
Name Type Attributes Default Description
contact Contact <optional>
{}

The contact data to create from

See:
  • Contact - See Contact class for all available properties

View Source infohub/User.js, line 73

A new Contact instance

Contact