Lightning types are JSON-based data types used to structure, validate, and display
data. While Salesforce provides a set of standard Lightning types, you can create custom
Lightning types to customize the UI experience based on your business requirements.
Required Editions
Available in: Lightning Experience
Available in: Enterprise, Performance, Unlimited, and
Developer Editions.
Create a Custom Lightning Type Define data structures and user interface configurations for supported platform features. You can base your type on an Apex class to ensure data consistency, or define a custom structure manually by using a JSON schema.
Apex-Based Custom Lightning Types An Apex-based custom Lightning type uses an Apex class to define its schema. Instead of manually creating fields, you map the type directly to your Apex class structure. This method is ideal when you have a complex data structure already defined in your Apex class code.
Object-Based Custom Lightning Types With an object-based custom Lightning type, you can define a schema manually by specifying fields. This method is ideal when you want to structure data without referencing an Apex class.
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.