|
|
If no valid Tooltip Definition is configured for Map Pins, tooltip content defaults to the standard format that ships with Service Board.
|
jobName = com.servicemax.dc.util.CommonUtils.truncateAndEscapeHtml(entity.primaryName, 100)
accountName = svmx_account?.entity?.primaryName ?:
account = com.servicemax.dc.util.CommonUtils.truncateAndEscapeHtml(accountName, 100)
"$<span>{jobName}</span><br /><b>${account}</b>"
|
|
Job names and account names are truncated if longer than 100 characters.
|
resourceName = com.servicemax.dc.util.CommonUtils.truncateAndEscapeHtml(entity.primaryName, 100)
// translate the resource type name
resourceTypeName = com.intalio.core.translation.TranslationFactory.getTranslatedMetadata('io_option', svmx_resource_type[0].getRecordId(), 'io_name')
resourceType = com.servicemax.dc.util.CommonUtils.truncateAndEscapeHtml(resourceTypeName, 100)
"<b>${resourceName}</b><br/><span>${resourceType}</span>"
|
|
Resource names and types are truncated if longer than 100 characters.
|
crewName = com.servicemax.dc.util.CommonUtils.truncateAndEscapeHtml(entity.primaryName, 100)
"<span>${crewName}</span>"
|
|
Crew names longer than 100 characters are truncated.
|
|
API
|
Description
|
Example
|
|---|---|---|
|
truncateAndEscapeHtml
|
Truncate text strings longer than the specified value and escape HTML tags.
|
com.servicemax.dc.util.CommonUtils.truncateAndEscapeHtml('This is a long text with tags.', 32)
Returns This is a long text with <html...
|
|
getTranslatedMetadata
|
Translate records to the current user’s default language.
|
technicianTypeId = UUID.fromString('c0728765-a8f4-49d9-acd2-79cb71a8dc0e')com.intalio.core.translation.TranslationFactory.getTranslatedMetadata('io_option', technicianTypeId, 'io_name')
Returns resource type translations in the current user’s default language.
|