Reference to a user's associated coworker business object.

In Lime CRM, user accounts (for authentication) are often separate from coworker/employee records (business objects with additional data). This interface provides the link between the two, allowing you to load the full coworker record when needed.

Example

// Load full coworker details
const user = appRepo.getCurrentUser();
if (user.coworker) {
const repo = platform.get(PlatformServiceName.LimeObjectRepository);
const coworker = await repo.loadObject(
user.coworker.limetype, // Usually 'coworker' or 'employee'
user.coworker.id
);

// Access additional properties
console.log(`Phone: ${coworker.properties.phone}`);
console.log(`Department: ${coworker.properties.department}`);
}

Hierarchy

  • UserCoworker

Properties

Properties

id: number

The ID of the coworker LimeObject.

Use this with LimeObjectRepository to load the full coworker record.

limetype: string

The name of the Limetype used for coworker records.

Typically "coworker" or "employee", but can vary by configuration. Use this as the limetype parameter when loading the object.