'localizable' => 0,
'FKClassName' => 'CRM_Contact_DAO_Contact',
'html' => [
+ 'type' => 'EntityRef',
'label' => E::ts("Contact"),
],
'add' => '1.1',
<fieldset af-fieldset="User1" class="af-container" af-title="User">
<af-field name="roles" />
<af-field name="username" />
+ <af-field name="contact_id" />
<af-field name="uf_name" />
<af-field name="is_active" />
<af-field name="timezone" defn="{help_pre: ts('Set the timezone of the user. Date and times will be shown in this timezone. You can also leave it empty to use the default system timezone (which is a server setting).'), input_attrs: {placeholder: ts('Server default timezone')}}" />
'id',
'username',
'uf_name',
+ 'contact_id',
+ 'contact_id.display_name',
'is_active',
'when_created',
'when_last_accessed',
'label' => E::ts('Roles'),
'sortable' => TRUE,
],
+ [
+ 'type' => 'field',
+ 'key' => 'contact_id.display_name',
+ 'dataType' => 'String',
+ 'label' => E::ts('Linked Contact'),
+ 'sortable' => TRUE,
+ 'link' => [
+ 'entity' => 'Contact',
+ 'action' => 'view',
+ 'join' => 'contact_id',
+ 'target' => '_blank',
+ ],
+ ],
[
'type' => 'field',
'key' => 'is_active',
<comment>FK to Contact ID</comment>
<html>
<label>Contact</label>
+ <type>EntityRef</type>
</html>
<add>1.1</add>
</field>