Teach Me Salesforce

A community approach to learning salesforce.com

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: https://youtu.be/7_cmcvmFn0U

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

Advertisements

Written by Always Thinkin

July 8, 2017 at 6:54 pm

Posted in Uncategorized

Apex Workshop Webinar 7: Classes

leave a comment »

The video for the workshop session on Apex Classes can be found on YouTube here: https://youtu.be/7yLutQjwxnI

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


Written by Always Thinkin

July 8, 2017 at 6:09 pm

Posted in Uncategorized

Apex Workshop Webinar 6: Triggers

leave a comment »

The video for the workshop session on Apex Triggers can be found on YouTube here: https://youtu.be/qxBtPIUVFSw

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


Written by Always Thinkin

July 8, 2017 at 5:43 pm

Posted in Uncategorized

Apex Workshop Webinar 5: Control Flow

leave a comment »

The video for the workshop session on Apex Control Flow can be found on YouTube here: https://youtu.be/zBehqZNNwr4

The worksheets for practicing are available here: https://gist.github.com/AlwaysThinkin/d872b8367acca2fc7e8fbf7806c8f178

Answers: https://gist.github.com/AlwaysThinkin/c3551cb22bd48b905e5a5bc153177e58

Written by Always Thinkin

July 8, 2017 at 5:34 pm

Posted in Uncategorized

Apex Workshop Webinar 4: SOQL

leave a comment »

The video for the workshop session on SOQL can be found on YouTube here: https://youtu.be/rvuhlklR-gk

The worksheets for practicing are available here:
Practice: https://gist.github.com/AlwaysThinkin/28d026db3e75be954345076d9a20d7e5

Answers: https://gist.github.com/AlwaysThinkin/cb4913ba47fbd44710db5740a626b9e7

Written by Always Thinkin

July 8, 2017 at 5:25 pm

Posted in Uncategorized

Apex Workshop Webinar 3: Collections

leave a comment »

In the third Apex Workshop Webinar we explored Collections: Lists, Sets and Maps.

In the exercise we again work with an Collections Exercises to practice manipulating Apex Collections (Answers to the exercises here). With Lists we learned different ways to populate a list while exploring the List Methods from the Apex Documentation. We practiced working with List indexes and expanded the concept to Lists of Lists and how to return values from anywhere in them. And we used a simple SOQL query to populate a list and noted how you must include any fields that you want to later reference.

From Lists we moved on to Sets. We described the differences between List (an ordered collection) and Sets (an unordered collection of unique value). We learned that with Sets, you can reference individual collection members by using the contains() Set Method and studied the Set Methods from the Apex Documentation. We also Lists into Sets and observed how duplicate values are automatically de-duped when added to Sets.

With Maps, we emphasize how very essential this collection type is to efficient Apex development. We explored different methods of putting key-value pairs in to Maps and retrieving the data with the keyset() and values() methods. And along the way we checked out the Map Methods from the Apex Documentation.

Through out the exercises, we used the Apex test methods of assert() and assertEquals() to test our work and to familiarize ourselves with unit testing.

Unfortunately we had technical difficulties with the recording and lost the first 20 minutes, but the most important discussions are in the 84 minutes we captured.

Written by Always Thinkin

March 20, 2017 at 7:49 pm

Posted in Apex, Beginner, Code Sample

Apex Workshop Webinar 2: Data Types

leave a comment »

Welcome to the written accompaniment to the Apex Workshop Series presented as Webinars in 2016!

This edition of the series introduces Data Types with an examination of the Primitive Data Types described in the official Apex Documentation. We then proceed on to work on an Apex Test Class that gives us a chance to experiment with the concepts as well as get familiar with the Developer Console environment (Answers to the exercises). We explore Test Classes & Methods, System Debug statements and String methods while working with the Debug Logs and the Execute Anonymous panel to see our output. Other Apex programming concepts introduced: String concatenation, escape characters, converting data types, indexes in strings, incrementation and operators.

Questions from the live webinar:

  1. What data type are Geolocation fields? Geolocation fields are doubles.

Questions from the Community:

If you watch the video or work on the exercises and have questions, post them to the comments!

Written by Always Thinkin

March 20, 2017 at 7:13 pm