Access control list defining permissions for this type. Determines what operations (read, write, delete, etc.) are allowed. See Acl for details on permission structure.
Label marking this limetype for a specific system usage, e.g. company,
person, or deal.
A limetype's name can be anything a schema defines, so label is how
the system recognizes a type's special-purpose role independent of its
name. There are many more labels than the common examples, defined by
Lime CRM or by the installation's configuration; most limetypes have
none.
Use localname.singular or localname.plural for user-facing text.
Localized names for the limetype. Contains both singular and plural forms based on current user language.
Plural form (e.g., 'Companies', 'People')
Singular form (e.g., 'Company', 'Person')
Internal name of the limetype (e.g., 'company', 'person', 'deal'). This is the identifier used in API calls and code.
Map of all properties defined on this limetype. Key is the property name, value is the LimeProperty definition.
import { PlatformServiceName } from '@limetech/lime-web-components';
const repository = platform.get(PlatformServiceName.LimeTypeRepository);
const limetype = repository.getLimeType('person');
const nameProperty = limetype?.properties['name'];
const allPropertyNames = Object.keys(limetype?.properties ?? {});
Get a property by name, with support for navigating relations using dot notation.
This method allows you to retrieve property definitions, including properties on related objects. When you specify a path like 'company.phone', it will:
Name of property to get. Can use dot notation to traverse relations (e.g., 'company.phone' to get phone property of related company)
The property definition for the specified property
Will throw an error containing the name of the missing property if the property does not exist
import { PlatformServiceName } from '@limetech/lime-web-components';
const repository = platform.get(PlatformServiceName.LimeTypeRepository);
const dealType = repository.getLimeType('deal');
if (dealType) {
const nameProperty = dealType.getProperty('name');
console.log(nameProperty.type); // 'string'
// Dot notation follows the relation to the company type
const phoneProperty = dealType.getProperty('company.phone');
console.log(phoneProperty.type); // 'phone'
console.log(phoneProperty.localname); // 'Phone'
const contactNameProperty = dealType.getProperty('contact.name');
if (contactNameProperty.required) {
console.log('Contact name is required');
}
}
Represents a Lime type definition in the Lime CRM system.
A LimeType defines the schema and metadata for a business object type (e.g., company, person, deal). It contains information about properties, access control, labels, and provides methods to navigate the type structure including related types through property relations.
LimeTypes are the foundation of the type system and describe:
labelmarking special-purpose typesExample: Accessing limetype properties