Improving Clarity's Ticketing App with Root Objects
Complex object data models often include multiple related objects that need to share configurations, permissions, and lifecycle behaviors. For example, in Clarity's ticketing app, they plan to use three separate objects for tickets, attachments, and comments. This structure enables users to add multiple attachments and comments to a single ticket. While managing these separate objects manually would create overhead, Clarity can streamline this process by configuring root relationships.
In these exercises, you'll implement this data model for Clarity's ticketing app.
Exercise: Enabling the Feature Flag
Before you can use this feature, you must enable the Root Object Definitions (LPD-34594) feature flag for your instance.
-
Open the Global Menu (
), go to the Control Panel tab, and click Instance Settings.
-
Click Feature Flags.
-
In the Release tab, search for LPD-34594 and enable it.
With this feature flag enabled, you can start using the root object feature.
Exercise: Creating the Ticket Attachment Object
By creating a separate object definition for attachments, Clarity can capture metadata about each file (e.g., title, description) and relate as many attachments to a ticket as needed. Here you'll create and publish the Ticket Attachment object as the Clarity Admin user.
-
Open the Global Menu (
), go to the Control Panel tab, and click Objects.
-
Go to the Ticketing folder.
-
Click View in Model Builder.
-
Click Create New Object, enter these details, and click Save:
Field
Value
Label
Ticket AttachmentPlural Label
Ticket AttachmentsObject Name
TicketAttachment -
Click Actions (
) for the new object and select Edit ERC.
-
Enter
TICKET_ATTACHMENTand click Save. -
Click Add Field or Relationship and select Add Field.
-
Enter these values and click Save.
Field
Value
Label
TitleField Name
titleType
Text
Enable Entry Translation
No
Mandatory
Yes
Accept Unique Values Only
No
-
Repeat the above step to add these fields:
Field
Value
Label
DescriptionField Name
descriptionType
Text
Enable Entry Translation
No
Mandatory
No
Accept Unique Values Only
No
Field
Value
Label
FileField Name
fileType
Attachment
Request Files
Upload Directly from the User’s Computer
Show Files in Documents and Media
No
Mandatory
Yes
-
Click Publish, check Ticket Attachment, and click Publish Objects to confirm.
-
Confirm the object is published successfully and click Close.
After creating the object definition, you can relate it to the Ticket object and enable inheritance.
Exercise: Relating the Ticketing Objects
When you define one-to-many relationships, you can enable inheritance, designating the parent object as the root for the child object. Here you’ll create a one-to-many relationship between the Ticket and Ticket Attachment objects and enable inheritance as the Clarity Admin user.
-
In the Object Model Builder, drag a line from the Ticket object to the Ticket Attachment object to create a relationship.
-
Enter these details:
Field
Value
Label
Ticket to AttachmentsName
ticketToAttachmentsType
One to Many
One Record Of
Ticket
Many Records Of
Ticket Attachments
Enable Inheritance
Yes
-
Click Save.
You've designated Ticket as the root object for Ticket Attachment. For a complete list of what this entails, see Using Object Inheritance.
Exercise: Creating the Ticket Comment Object
A single object definition can have multiple parents, even though each individual entry belongs to only one parent at a time. Because of this, Clarity can create a single Ticket Comment object and relate it to both the Ticket and Ticket Attachment objects as a child. Here you’ll set up this object and its relationships as the Clarity Admin user.
- Open the Global Menu (
), go to the Control Panel tab, and click Objects.
-
Go to the Ticketing folder.
-
Click View in Model Builder.
-
Click Create New Object, enter these values, and click Save:
Field Value Label Ticket CommentPlural Label Ticket CommentsObject Name TicketComment -
Click Actions (
) for the new object and select Edit ERC.
-
Enter
TICKET_COMMENTand click Save. -
Click Add Field or Relationship and select Add Field.
-
Enter these values and click Save.
Field Value Label CommentTextField Name commentTextType Text Enable Entry Translation No Mandatory Yes Accept Unique Values Only No -
Click Publish, check Ticket Comment, and click Publish Objects to confirm.
-
In the Object Model Builder, drag a line from the Ticket object to the Ticket Comment object to create a relationship.
-
Enter these values and click Save:
Field Value Label Ticket to CommentsName ticketToCommentsType One to Many One Record Of Ticket Many Records Of Ticket Comments Enable Inheritance Yes -
Drag a line from the Ticket Attachment object to the Ticket Comment object to create a second relationship.
-
Enter these values and click Save:
Field Value Label Ticket Attachment to CommentsName ticketAttachmentToCommentsType One to Many One Record Of Ticket Attachment Many Records Of Ticket Comments Enable Inheritance Yes -
Verify both relationships appear with Ticket Comment shown as a child of both Ticket and Ticket Attachment.
Great! You've configured Ticket Comment as a child with two root objects. Each individual comment entry will inherit from either Ticket or Ticket Attachment based on its related entry.
Conclusion
A well-designed inheritance model centralizes access control and reduces structural duplication across related entities. Using object inheritance, you can build scalable data models that streamline object management across every entity within your application.
Next, you’ll review what you’ve learned before moving on to the next module.
Capabilities
Product
Education
Knowledge Base
Contact Us