Teach Me Salesforce

A community approach to learning salesforce.com

Trailhead Review: Quick Start: Apex Coding for Admins

leave a comment »

Review of Quick Start: Apex Coding for Admins

This Project won’t teach you a lot of Apex concepts, but is good practice creating Apex Classes and Triggers in the Setup UI and using Workbench with Anonymous Apex to execute the code. The Steps themselves don’t try to teach you Apex and just involve cutting and pasting code then executing the code, however the comments are thorough, one for each line. The comments use formal terminology to describe each line’s action, so they are a good lesson in speaking “Developer”.

Overall, the instructions could add more detailed conceptual descriptions to help Admins grasp what they are doing, perhaps even comparing the actions to what they might already know from declarative development (e.g. the BankAcct class is similar to a Custom Object with number and text fields, plus a Workflow Field Update that adds numbers).

Step 1 is just about setting up the metadata for this project.

Step 2 is just copying and pasting to create two Apex Classes.

Step 3 is just another copy and paste into Workbench to verify that the previous classes behave as expected.

Step 4 introduces Lists and replaces the code fromStep 2 to include a List.

So far, not many concepts have been discussed in the Trailhead itself, but the comments in the code are thorough and should be read carefully to get the most out of this module.

Step 5 introduces For Loops (although without really explaining what they’re for) and updates an Apex class to include a For Loop.

Step 6 introduces DML, specifically the database insert method to add Contacts.

Step 7 introduces SOQL and updates an Apex class to include a SOQL query.

Step 8 adds a Trigger and tests it by creating a custom object record to verify that the Contact insert from Step 6 works.



Written by Always Thinkin

December 9, 2018 at 4:49 pm

Posted in Apex, Beginner

Tagged with

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: