Trail Map โ€บ Use-Case Catalog โ€บ Metadata Engine
๐Ÿงฉ Foundation ยท Module 02

Metadata Engine: Build New Objects Without a Developer

SmartLite's core superpower: admins define new business objects and fields at runtime, and the platform instantly generates forms, validation, and record pages โ€” no code, no migration, no deploy.

4
Units
~12 min
Time to Complete
80 pts
Available
1 Badge
Data Model Architect
Unit 1 ยท Business Problem

Why a metadata engine matters

RK
Rina Kapoor ยท Operations Manager, Northwind Distributors

"We need to start tracking equipment warranties against our customer accounts. Our old CRM vendor quoted six weeks and $15,000 to add one custom object with a handful of fields. We needed it live before our next sales cycle."

In most systems, adding a new kind of record โ€” a new "table" โ€” means a developer, a database migration, and a deployment. That turns every new business idea into an engineering ticket with a multi-week queue.

๐Ÿ’ก
Business outcome
A new tracked business entity, live in minutes โ€” with zero developer cost, zero deployment risk, and a data model that evolves as fast as the business does.
Unit 2 ยท How It Works

Anatomy of the Metadata Engine

Instead of one database table per business entity, SmartLite stores the shape of your data โ€” objects and fields โ€” as metadata rows, and the actual record data as JSON. Nothing about a new object or field requires touching the database schema.

ConceptWhat it isBusiness translation
ObjectA row in object_definition (e.g. "Warranty")A new kind of record your team wants to track
FieldA row in field_definition, typed via the FieldType enumAn attribute on that record โ€” text, number, date, picklist, lookup, formula, auto-number
Formula fieldEvaluated live at read time, never storedComputed values like "Tier" from IF(amount__c > 10000, "Enterprise", "Standard")
Lookup fieldRelationship to another object; parent data injected at read timeConnects records together, e.g. Warranty โ†’ Account
โœ…
Naming convention
Anything an admin creates through the UI โ€” a custom object or a custom field, even one added to a standard object like Lead โ€” automatically gets a __c suffix in its API name. Standard, platform-seeded objects and fields keep plain names.

Every metadata read is cached per organization for speed; every metadata write evicts that cache and calls metadataEngine.invalidate(orgId) so the change is visible instantly, with no restart required.

Unit 3 ยท Hands-On Challenge

Build a "Warranty" object from scratch

Open Object ManagerSetup โ†’ Object Manager โ†’ New Object.
Name the objectLabel: "Warranty", Plural Label: "Warranties" โ€” the API name warranty__c is generated automatically. Save.
Add a fieldOpen the new object โ†’ Fields tab โ†’ New Field โ†’ Label "Expiration Date", type DATE. Save.
Add a lookup fieldNew Field โ†’ Label "Account", type LOOKUP, related object: Account. Save.
Create a recordGo to Records โ†’ Warranties โ†’ New. Notice the form rendered itself automatically from the fields you just defined โ€” no code was written.
๐ŸŽฏ
Go further
Add a Formula field, e.g. Days Remaining using {expiration_date__c} - TODAY()-style logic via the Formula Editor, and watch it compute live on every record without ever being stored.
Unit 4 ยท Knowledge Check

Test what you learned

1. What suffix does an admin-created custom object or field get in its API name?
_std
__c
No suffix โ€” all fields look identical
2. Where is the value of a FORMULA field stored?
In the record's data_json, updated on every save
Nowhere โ€” it's computed live every time the record is read
In a separate formula_cache table