Different Data Types in Salesforce
Apex in Salesforce assigns a data type to all variables and expressions, such as sObject, primitive, or enum.
- Integer, Double, Long, Date, Datetime, String, ID, or Boolean are examples of primitives
- An sObject, such as an Account, Contact, or MyCustomObject c, is either general or particular.
- A collection that includes the following items:
- A list (or array) of primitives, sObjects, user-defined objects, Apex classes-created objects, or collections
- a collection of primitives
- A primitive-to-primitive map, sObject, or collection
- An enumeration is a typed list of values
- Objects made from Apex classes defined by the user
- Objects built with Apex classes provided by the system
- Null (for the null constant)
There are different kinds of data types depending on conditions. The five different data types in API:
- Varies by type
Variables in Salesforce
- The syntax for declaring local variables, defining and initializing the multiple variables in a single line, is similar to that of Java.
- If you declare a variable but don’t assign a value to it, it will be null. In its simplest form, null denotes the lack of a value. Any variable specified with a primitive type can also be set to null.
- Variables can be declared at any point in a block and then take on scope from there. Sub-blocks can’t change the name of a variable that has already been used in a parent block, although parallel blocks may.
Want to know more about Salesforce? Read this extensive Salesforce Tutorial!
Different Salesforce Field Types Depending on the Data Types and their Transformation Data Types.
||Transformation Data Types
||Look up relational, master-detail relationship
||Auto number, email, phone, multi-select picklist, text, text area, long text area, rich text area, data category group reference, and URL
||Currency, formula, number, percent, and roll-up summary
|Varies by type
||A type must be given when formula fields are added in the user interface. Currency, date, date/time, number, percent, or text are all API data types that correspond to this type.
Learn more about Salesforce Automation System in this insightful blog now!
Get 50% Hike!
Master Most in Demand Skills Now !
Different Salesforce Field Types
||A compound data type that contains address field data
||A polymorphic data type that returns a string, picklist, reference, Boolean, currency, int, double, percent, ID, date, DateTime, URL, or email data depending on the kind of field involved
||A field that is defined by a formula
||A Combobox, which includes a set of enumerated values and allows the user to specify a value, not on the list
|| Currency values
||Reference to a data category group or a category unique name
||An encrypted text field that contains any combination of letters/numbers/symbols stored in an encrypted form; you can set up a maximum length of up to 175 characters; available in API versions 11.0 and later
||A primary key field for an object
||A string array of referenced ID values representing the many-to-many relationship of an underlying junction entity; you have to query and manipulate the string array to query and manipulate the underlying junction entities in a single API call
||A compound data type that contains latitude and longitude values for geolocation fields
||When records are merged, the ID of the record that is saved (the other records are deleted)
||Multi-select picklist includes a set of enumerated values from which multiple values can be selected
||Phone numbers; values can include alphabetic characters; client applications are responsible for phone number formatting
||Picklist includes a set of enumerated values from which one value can be selected
||Cross-references to a different object; analogous to a foreign key field in SQL
||A string that is displayed as a multi-line text field
||URL values; usually, client applications should display these as hyperlinks
Learn end-to-end Salesforce concepts through the Salesforce Course in Hyderabad to take your career to a whole new level!
- TAB menu: In this, all tabs are arranged in a row.
- All TAB menu: In this, you can find all the tabs available in salesforce.com.
- More TAB menu: In this, you can find more tabs available in salesforce.com.
- User menu: This is available at the top with a username. By using this component you can change your profile settings.
- Sidebar menu: In this, there are different sections such as build, monitor, jobs, logs, etc.
- Application menu: It allows shuffling between applications.
- Search menu: It helps search in Salesforce.
Go for this in-depth job-oriented Salesforce Training Course now!