Apex Code Flashcards
1
Q
Primitive Data Types
A
Integer Double Long Date Date/Time String ID Boolean Blob Decimal Object Time
2
Q
IDEs compatible with SalesForce
A
VS Code
Force.com IDE
Dev Console
3
Q
Collections
A
Maps
Lists
Sets
4
Q
Coding best practices 10
A
Comment Bulkify Efficient for loops Utilize collections No SOQL/SOSL in loops One trigger per object Query large data sets Use limits class Use @future appropriately Test large data sets Don’t hard core ID’s
5
Q
Testing best practices 10
A
Always test Single actions Bulk actions Positive actions Negative actions User access Test each branch of if statement No exceptions outside of try catch Use system.assert to verify data Test bulk of at least 20 records Set up test data Comment tests Order by Test individually to catch all errors Start with most specific tests and get broader as you move along