Variables and data types – strings, dates, numbers, booleans, and sObjects
Data types are simply the different types of variables you can have
String bestteam = 'PortsmouthFC';
Integer numberofpoints = 3;
Decimal goalratio = 0.9;
Boolean winner = true;
Date next match = Date.today().addDays(30);
DateTime now = DateTime.now();
Contact me = [SELECT FirstName, LastName
FROM Contact
WHERE Email = 'iain.banks@email.com'
LIMIT 1];
Strings are simply text variables
Integers and decimals are used in number, currency, and percentage fields in Salesforce. Integers are for number fields without any decimal places.
Booleans are just either true or false. They’re used with checkboxes in Salesforce.
No comments:
Post a Comment