An implementation of TeamConnect contains a variety of object definitions that are classified in one of the following ways:
•System Object Definitions—Objects that exist as part of the core functionality of TeamConnect, before any customization. A TeamConnect implementation may utilize some, all, or none of the system objects. System objects include Account, Appointment, Contact, Document, Expense, History, Invoice, Involved, and Task.
•Custom Object Definitions—Objects defined for a TeamConnect implementation. Custom objects could be Claims, Cases, Matters, Litigations, among others. They can have parent-child relationships with one another or you can define a custom object as an embedded object of another custom object, which is a child object with limited functionality.
An instance of an object is a record. For more details about system or custom objects, see About Objects.
If you want to retrieve object definitions using the API, you can use ObjectDefinitionService. As part of the ObjectDefinitionService interface, you can use the getObjectDefinition() method to retrieve an object definition. If the API cannot find an object definition that fits the unique code, the method throws an exception. The following code sample uses the getObjectDefinition() method to retrieve the contact object definition.
ObjectDefinition contactObjectDefinition = objectDefinitionService.getObjectDefinition("CONT"); |
In the following code sample, you can use the getObjectDefinition() method to retrieve a custom object definition with the unique code of MATT.
ObjectDefinition matterObjectDefinition = objectDefinitionService.getObjectDefinition("MATT"); |
Note: Use the following code to access ObjectDefinitionService: ObjectDefinitionService objectDefinitionService = platform.getObjectDefinitionService();
The ObjectDefinitionService methods use the ObjectDefinition class to return information about object definitions. ProjectObjectDefinition and InvolvedObjectDefinition also extends ObjectDefinition. The ObjectDefinition class includes the settings on the following pages of an object definition in the Setup:
•General—The hasInvolved(), isContactCentric(), and isNewBtnNotShownInRelObjBlock() methods refer to settings that might appear on the General page, depending on the type of object definition. If an object definition does not have the associated setting, the method returns false.
•Wizards—The getRequiresWizardForCreate() method refers to whether or not the setting on the Wizards page specifies that a wizard is required to create a new record.