entities
Allows you to load any CRM entity by ID. If the entity exists, a entity object will be returned. If an entity with the given ID is not found, null will be returned.
{% assign account = entities.account['936DA01F-9ABD-4d9d-80C7-02AF85C822A8'] %}
{% if account %}
{{ account.name }} ({{ account.statecode.label }})
{% endif %}
{% assign entity_logical_name = 'contact' %}
{% assign contact = entities[entity_logical_name][request.params.contactid] %}
{% if contact %}
{{ contact.fullname }} ({{ contact.parentcustomerid.name }})
{% endif %}
Entity
An entity object provides access to the attributes of a CRM entity record.
Attribute | Description |
---|---|
id |
The GUID ID of the entity, as a string. e.g. |
logical_name |
The CRM logical name of the entity. e.g. |
notes |
Loads any notes ( |
permissions |
Loads Entity Permission assertion results for the entity. Results are returned as a permissions object. |
url |
Returns the Adxstudio Portals content management system URL path for the entity. If the entity has no valid URL in the current website, returns Generally, this will only return a value for certain entity types that have been integrated into the Adxstudio Portals CMS ( |
[attribute or relationship name] |
You can access any attribute of the CRM entity by logical name. {{ entity.createdon }} The values of most entity attributes map directly to Liquid types: Two Option fields map to booleans, text fields to strings, numeric/currency fields to numbers, date/time fields to date objects. But, some attribute types are returned as objects:
You can also load any related entities by relationship schema name. {{ page.adx_webpage_entitylist.adx_name }} In the case that a relationship is reflexive (i.e. self-referential), a reflexive relationship object will be returned. (Otherwise, the desired result would be ambiguous.) {{ page.adx_webpage_webpage.referencing.adx_name }} Loading large numbers of related entities, or accessing large numbers of relationships in a single template, can have a negative impact on template rendering performance. Avoid loading related entities for each item in an array, within a loop. Where possible, prefer use of the |
Entity Reference
Lookup attribute values are returned as entity reference objects, with the following attributes.
Attribute | Description |
---|---|
id |
The GUID ID of the referenced entity, as a string. e.g. |
logical_name |
The CRM logical name of the referenced entity. e.g. |
name |
The primary name attribute of the referenced entity. |
Note
A note is an entity object that provides access to the attributes and relationships of an annotation
record. In addition to all the attributes of an entity object, a note has the following additional attributes.
Attribute | Description |
---|---|
documentbody |
Loads the Use of the Use the |
url |
Returns the URL path for the built-in portal annotation attachment handler. If the user has permission, and the note has an attached file, a request to this URL will download the note file attachment. |
Option Set Value
Option Set/Picklist attribute values are returned as entity reference objects, with the following attributes.
Attribute | Description |
---|---|
label |
The localized label of the option set/picklist attribute value. e.g. |
value |
The integer value of the option set/picklist attribute value. e.g. |
Entity Permissions
The Entity Permissions object provides access to aggregated permission assertion results for an entity.
Attribute | Description |
---|---|
can_append |
Returns |
can_append_to |
Returns |
can_create |
Returns |
can_delete |
Returns |
can_read |
Returns |
can_write |
Returns |
rules_exist |
Returns |
Reflexive Relationship
Attempts to load reflexive (i.e. self-referential) relationships on entities are returned as objects with the following attributes.
Attribute | Description |
---|---|
is_reflexive |
Returns |
referenced |
Returns an array of referenced entities for the given relationship. |
referencing |
Returns a referencing entity for the given relationship. Returns If the relationship is many-to-many (N:N), returns an array of referencing entities. |