User

The user object contains information about a user record.

All users have member records in People & Organizations. You may set contact information and add other details to user records -- useful for pulling contact details through to documents.

Members

Contacts, organizations, vehicles, venues, and users are all known as members in the database. Members have some shared attributes, along with attributes that are specific to that particular member type.

When you're checking a list of members, you can use the type object to determine what type of member you're working with.

For example, the participants object against an opportunity returns participant objects for any members who are participants on the opportunity. To print only users:

<ul>
  {% for participant in order.participants %}
    {% if participant.type == "User" %}
      <li>{{ participant.name }}</li>
    {% endif %}
  {% endfor %}
</ul>

Objects that return users

In most documents and discussion templates, you may use:

current_user

Returns information about the logged-in user.

{{ current_user.name }}

owner_user

Returns information about the owner user of a record:

{{ owner_user.name }}

Document layouts

The user object can be accessed in document layouts created against the following modules:

Member

From a user record:

{{ member.name }}

Opportunity

To print users that are a participant against an opportunity:

{% for participant in order.participants %}
  {% if participant.type == "User" %}
    {{ participant.name }}
  {% endif %}
{% endfor %}

To print users that are sub-contract suppliers for service bookings:

{% for item in order.services %}
  {% if item.is_item? %}
    {% for asset in item.assets %}
      {% if asset.is_resource_stock? %}
        {% if asset.resource.type == "User" %}
          {{ asset.resource.name }}
        {% endif %}
      {% endif %}
    {% endfor %}
  {% endif %}
{% endfor %}

Project

To print users that are a participant against a project:

{% for participant in project.participants %}
  {% if participant.type == "User" %}
    {{ participant.name }}
  {% endif %}
{% endfor %}

Purchase order

To print information about the user who authorized a purchase order:

{{ authoriser.name }}

Discussion templates

The user object can be accessed in discussion templates created against the following modules:

Member

From a venue record:

{{ user.name }}

Opportunity

To print users that are a participant against an opportunity:

{% for participant in opportunity.participants %}
  {% if participant.type == "User" %}
    {{ participant.name }}
  {% endif %}
{% endfor %}

To print users that are sub-contract suppliers for service bookings:

{% for item in opportunity.services %}
  {% if item.is_item? %}
    {% for asset in item.assets %}
      {% if asset.is_resource_stock? %}
        {% if asset.resource.type == "User" %}
          {{ asset.resource.name }}
        {% endif %}
      {% endif %}
    {% endfor %}
  {% endif %}
{% endfor %}

Project

To print users that are a participant against a project:

{% for participant in project.participants %}
  {% if participant.type == "User" %}
    {{ participant.name }}
  {% endif %}
{% endfor %}

Purchase order

To print information about the user who authorized a purchase order:

{{ authoriser.name }}

activities

Returns activity objects for the activities relating to a user.

Input

{% for activity in member.activities %}
  {{ activity.subject }}
{% endif %}

Output

Call to follow up

address

Returns a user's primary address.

Input

{{ member.address }}

Output

882 Broderick Flats Lake Erlingchester MA 67553-4548

address_detail

Returns address objects for a user's primary address.

Input

{{ member.address_detail.state }}

Output

MA

attachments

Returns attachment objects for attachments stored against a user.

Input

{% for attachment in member.attachments %}
  {{ attachment.attachment_url }}
{% endfor %}

Output

https://s3.amazonaws.com/current-rms/f7b92d60-1421-0132-8004-0401207f6801/attachments/473/original/Ann_Veal.jpg

description

Returns a user's description.

Input

{{ member.description }}

Output

I mean it's one banana Michael. What could it cost, $10?

email

Returns the first work email address stored against a user.

Input

{{ member.email }}

Output

dennis@wolfcola.com

emails

Returns email objects for email addresses stored against a user.

Input

{% for email in member.emails %}
  {{ email.address }}
{% endfor %}

Output

help@current-rms.com

icon_url

Returns a URL pointing at the user's picture. The full size image is returned.

Input

{{ member.icon_url }}

Output

https://s3.amazonaws.com/cobra-4934606a-294f-4fc2-bca1-2fd55ba5019c/icons/449/original/abigail.jpeg

image_attachments

Returns attachment objects for attachments stored against a user. Only returns those that have a file type of image.

Input

{% for attachment in member.attachments %}
  {{ attachment.attachment_url }}
{% endfor %}

Output

https://s3.amazonaws.com/current-rms/f7b92d60-1421-0132-8004-0401207f6801/attachments/473/original/Ann_Veal.jpg

id

Returns a user's ID.

The ID is an internal reference for a record. It's not exposed in our web interface.

Input

{{ member.id }}

Output

10

lawful_basis_type_id

Returns the legal basis type ID for a user.

Input

{{ member.lawful_basis_type_id }}

Output

11005

lawful_basis_type_name

Returns a user's legal basis type name.

You may add legal basis types in System Setup > List of Values.

  • Legitimate interest - prospect

  • Legitimate interest - existing customer

  • Performance of a contract

  • Freely given consent

  • Employee

  • Unknown

Input

{{ member.lawful_basis_type_name }}

Output

Employee

live_purchase_orders

Returns purchase order objects for purchase orders against a user. Only live purchase orders are returned.

Input

<ul>
  {% for purchase_order in member.live_purchase_orders %}
    <li>{{ purchase_order.name }}</li>
  {% endfor %}
</ul> 

Output

• Sub-contract service

mobile

Returns a user's cell phone number. The first telephone number with the type “cell” or “mobile” is returned.

Input

{{ member.mobile }}

Output

(756) 555 1939

name

Returns a user's name.

Input

{{ member.name }}

Output

Dennis Reynolds

phones

Returns telephone objects for telephone numbers stored against a user.

Input

{% for telephone in member.phones %}
  {{ telephone.number }}
{% endfor %}

Output

(636) 555 0113

telephone

Returns a user's telephone. The first telephone number with the type “work” is returned.

Input

{{ member.telephone }}

Output

(636) 555 0113

title

Returns a user's title.

Input

{{ member.title }}

Output

Executive Vice President of Worldwide Distribution

Last updated