• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Edit
Show / Hide Table of Contents

Form elements - entity-specific

Some tooltip text!
• 3 minutes to read
 • 3 minutes to read

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 and select sale.

Screen capture of select entity drop-downs

Edit entity menu element

Adds an entity menu.

Default menu for customer

Simple values:

entity = customer
entityMenu = customer
label = Entitymenu

Screen capture of entity menu element

Custom menu

Creation script:

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

Persons and organizations

Selection drop-downs:

  • Select agent
  • Select company
  • Select contact business
  • Select contact category
  • Select contact and Select contacts
  • Select user

Category membership element (for user)

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

categoryId = 2
label = Category
noWeights = false

Screen capture of category membership element

Tip

Read more about working with users.

Follow-ups, dates, and time

Selection drop-downs:

  • Select appointment
  • Select date
  • Select datetime
  • Select time
  • Select timespan

Requests

Selection drop-downs:

  • Select category (for ticket)
  • Select priority (for ticket)
  • Select message (from ticket)
  • Select request status
  • Select FAQ
  • Select reply template
  • Select insert text

Message grid

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

label = Messages
ticketId = 3

Screen capture of message grid element

Contact and recipient

Represent customers connected to a request.

Creation script to set the ticket ID dynamically:

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.

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

Request status element

Request status element

Recipients element

Recipients element

copyToAll = false
copyToCreatedBy = true
copyToCustomer = false
copyToEab = false
copyToOther = false
copyToOwner = true
copyToSelf = true
label = Recipients 3
ticketId = 1

Screen capture of recipients element

Address book element

Address book organizes addresses in a tree view

Attachment element

Adds an attachment field to the screen.

label = Attachments
multiple = true
noHardDelete = true

Screen capture of attachment element

Sales and projects

Selection drop-downs:

  • Select sale
  • Select project

Invoice rows element

Invoice rows

Security and database

Selection drop-downs:

  • Select slevel
  • Select CRM selection
  • Select extra field
  • Select table
  • Select relation
  • Select relations
In This Article
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top