> ## 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.

# Form elements - entity-specific

> Form elements - entity-specific

Some form elements are specific to SuperOffice entities.

## Select entity fields

There's a wide range of elements that add a drop-down to select an entity of a specific type. For example, [select company][1] and [select sale][2].

![Screen capture of select entity drop-downs][img1]

## Edit entity menu element

Adds an [entity menu][3].

### Default menu for customer

**Simple values:**

```crmscript theme={null}
entity = customer
entityMenu = customer
label = Entitymenu
```

![Screen capture of entity menu element][img2]

### Custom menu

**Creation script:**

```crmscript theme={null}
HtmlElement em;
Map m;

m.insert("label", "VG");
m.insert("iconUrl", "");
m.insert("url", "http://www.vg.no");
m.insert("target", "");
em.setFieldValue("addMenu", m);
m.clear();

m.insert("label", "DN");
m.insert("iconUrl", "");
m.insert("url", "http://www.dn.no");
m.insert("target", "");
em.setFieldValue("addAnchor", m);
m.clear();

m.insert("label", "SuperOffice");
m.insert("iconUrl", "");
m.insert("url", "https://www.superoffice.com");
m.insert("target", "");
em.setFieldValue("addMenu", m);
m.clear();
```

![Screen capture of custom entity menu][img3]

## Persons and organizations

**Selection drop-downs:**

* [Select agent][4]
* [Select company][1]
* [Select contact business][5]
* [Select contact category][6]
* [Select contact][7] and [Select contacts][8]
* [Select user][9]

### Category membership element (for user)

Used to visualize (and change) [which category a user belongs to][10].

```crmscript theme={null}
categoryId = 2
label = Category
noWeights = false
```

![Screen capture of category membership element][img4]

<Tip>
  Read more about [working with users][11].
</Tip>

## Follow-ups, dates, and time

**Selection drop-downs:**

* [Select appointment][12]
* [Select date][13]
* [Select datetime][14]
* [Select time][15]
* [Select timespan][16]

## Requests

**Selection drop-downs:**

* [Select category][17] (for ticket)
* [Select priority][18] (for ticket)
* [Select message][19] (from ticket)
* [Select request status][20]
* [Select FAQ][21]
* [Select reply template][22]
* [Select insert text][23]

### Message grid

A [message grid][24] displays the messages of a ticket in a grid. Each message has a check-box.

```crmscript theme={null}
label = Messages
ticketId = 3
```

![Screen capture of message grid element][img5]

### Contact and recipient

Represent [customers connected to a request][25].

**Creation script to set the ticket ID dynamically:**

```crmscript theme={null}
Map config = getScreenElementConfig(screenElementIndex);
config.insert("ticketId", getVariable("entryId"));

addHtmlElement(getScreenElementId(screenElementIndex), getScreenElementName(screenElementIndex),
  getScreenElementType(screenElementIndex), config);
```

**Creation script to override the default columns:**

This removes the pre-defined columns (noDefaultFields) and adds columns for first name, last name, email, and phone.

```crmscript theme={null}
HtmlElement recipients = addHtmlElement(getScreenElementId(screenElementIndex),
  getScreenElementName(screenElementIndex),
  getScreenElementType(screenElementIndex),
  "ticketId = " + getCgiVariable("ticketId") + "\nlabel = Recipients\nnoDefaultFields = true\n");

Map colMap;

colMap.insert("displayField", "person.firstname");
colMap.insert("searchField", "person.firstname");
colMap.insert("operator", "OperatorBeginsWith");
colMap.insert("label", "Firstname");
recipients.setFieldValue("addColumn", colMap);

colMap.clear();
colMap.insert("displayField", "person.lastname");
colMap.insert("searchField", "person.lastname");
colMap.insert("operator", "OperatorBeginsWith");
colMap.insert("label", "Lastname");
recipients.setFieldValue("addColumn", colMap);
colMap.clear();

colMap.insert("displayField", "Email.email_address");
colMap.insert("searchField", "Email.email_address");
colMap.insert("operator", "OperatorBeginsWith");
colMap.insert("label", "Email");
recipients.setFieldValue("addColumn", colMap);
colMap.clear();

colMap.insert("displayField", "phone.phone");
colMap.insert("searchField", "phone.phone");
colMap.insert("operator", "OperatorBeginsWith");
colMap.insert("label", "Phone");
recipients.setFieldValue("addColumn", colMap)
```

![Screen capture of contact and recipients element][img8]

### Request status element

[Request status][27] element

### Recipients element

[Recipients][28] element

```crmscript theme={null}
copyToAll = false
copyToCreatedBy = true
copyToCustomer = false
copyToEab = false
copyToOther = false
copyToOwner = true
copyToSelf = true
label = Recipients 3
ticketId = 1
```

![Screen capture of recipients element][img6]

### Address book element

[Address book][29] organizes addresses in a tree view

### Attachment element

Adds an [attachment field][30] to the screen.

```crmscript theme={null}
label = Attachments
multiple = true
noHardDelete = true
```

![Screen capture of attachment element][img7]

## Sales and projects

**Selection drop-downs:**

* [Select sale][2]
* [Select project][31]

### Invoice rows element

[Invoice rows][32]

## Security and database

**Selection drop-downs:**

* [Select slevel][33]
* [Select CRM selection][34]
* [Select extra field][35]
* [Select table][36]
* [Select relation][37]
* [Select relations][38]

[1]: ../reference/select-company

[2]: ../reference/select-sale

[3]: ../reference/edit-entity-menu

[4]: ../reference/select-agent

[5]: ../reference/select-contact-business

[6]: ../reference/select-contact-category

[7]: ../reference/select-customer

[8]: ../reference/select-customers

[9]: ../reference/select-user

[10]: ../reference/category-membership

[11]: ../../../automation/crmscript/howto/contact/index

[12]: ../reference/select-appointment

[13]: ../reference/select-date

[14]: ../reference/select-datetime

[15]: ../reference/select-time

[16]: ../reference/select-timespan

[17]: ../reference/select-category

[18]: ../reference/select-priority

[19]: ../reference/select-message

[20]: ../reference/select-request-status

[21]: ../reference/select-faq

[22]: ../reference/select-reply-template

[23]: ../reference/select-insert-text

[24]: ../reference/message-grid

[25]: ../reference/contact-and-recipient

[27]: ../reference/select-ticket-status

[28]: ../reference/recipients

[29]: ../reference/address-book

[30]: ../reference/attachment

[31]: ../reference/select-project

[32]: ../reference/invoice

[33]: ../reference/select-slevel

[34]: ../reference/select-crm-selection

[35]: ../reference/select-extra-field

[36]: ../reference/select-table

[37]: ../reference/select-relation

[38]: ../reference/select-relations

[img1]: /media/loc/en/ui/select-entity-dropdown.png

[img2]: /media/loc/en/ui/entity-menu-element.png

[img3]: /media/loc/en/ui/entity-menu-custom.png

[img4]: /media/loc/en/ui/category-membership.png

[img5]: /media/loc/en/ui/message-grid.png

[img6]: /media/loc/en/ui/recipients-element.png

[img7]: /media/loc/en/ui/attachment-element.png

[img8]: /media/loc/en/ui/contact-and-recipients-element.png


## Related topics

- [NetServer GoogleRecaptcha element](/en/onsite/web-config/googlerecaptcha.md)
- [HtmlElement](/en/automation/crmscript/reference/CRMScript.Native.HtmlElement.md)
- [NSEntityElement](/en/automation/crmscript/reference/CRMScript.NetServer.NSEntityElement.md)
- [NetServer SoFormsAuthentication element](/en/onsite/web-config/soformsauthentication.md)
- [Publish forms](/en/marketing/forms/learn/publish.md)
- [Google reCAPTCHA in Forms](/en/marketing/forms/learn/recaptcha.md)
- [The Navigator](/en/learn/getting-started/main-screen/navigator.md)
