Teach Me Salesforce

A community approach to learning salesforce.com

Archive for the ‘Beginner’ Category

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.

 

Advertisements

Written by Always Thinkin

December 9, 2018 at 4:49 pm

Posted in Apex, Beginner

Tagged with

Apex Workshop Webinar 11: Custom Settings

leave a comment »

The video for the workshop session on Apex with Custom Settings can be found on YouTube here:

The trigger and its unit test we worked with in this session is available here:

Written by Always Thinkin

July 8, 2017 at 7:15 pm

Posted in Apex, Beginner, Code Sample

Apex Workshop Webinar 10: Exception Handling

leave a comment »

The video for the workshop session on Apex Exception Handling can be found on YouTube here:

The trigger and its unit test we worked with in this session is available here:

Written by Always Thinkin

July 8, 2017 at 7:05 pm

Posted in Apex, Beginner, Code Sample

Apex Workshop Webinar 9: Unit Tests

leave a comment »

The video for the workshop session on Apex Unit Testing can be found on YouTube here:

The trigger and its unit test we worked with in this session is available here:

Written by Always Thinkin

July 8, 2017 at 7:01 pm

Posted in Apex, Beginner, Code Sample

Apex Workshop Webinar 8: Invocable Apex

leave a comment »

The video for the workshop session on Invocable Apex Classes can be found on YouTube here:

The original source is from a presentation at Dreamforce ’16 based on https://github.com/mshanemc/processBuilderBlocks.
In our session we worked with:
PBB Lock:
https://github.com/mshanemc/processBuilderBlocks/blob/master/src/classes/PBBLock.cls
PBB Delete:
https://github.com/mshanemc/processBuilderBlocks/blob/master/src/classes/PBBDelete.cls
PBB Utility (dedupe):
https://github.com/mshanemc/processBuilderBlocks/blob/master/src/classes/PBBUtilities.cls

Ohad’s String Utility

Written by Always Thinkin

July 8, 2017 at 6:54 pm

Posted in Apex, Beginner, Code Sample

Apex Workshop Webinar 7: Classes

leave a comment »

The video for the workshop session on Apex Classes can be found on YouTube here:

The triggers and their unit tests for practicing are available here:


Written by Always Thinkin

July 8, 2017 at 6:09 pm

Posted in Apex, Beginner, Code Sample

Apex Workshop Webinar 6: Triggers

leave a comment »

The video for the workshop session on Apex Triggers can be found on YouTube here:

The triggers and their unit tests for practicing are available here:


Written by Always Thinkin

July 8, 2017 at 5:43 pm

Posted in Apex, Beginner, Code Sample