Apex for Admins: Beyond the Basics (Part 2)
-
Upload
salesforce-developers -
Category
Technology
-
view
108 -
download
1
description
Transcript of Apex for Admins: Beyond the Basics (Part 2)
![Page 1: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/1.jpg)
Apex for Admins Build on the BasicsMay 22, 2014
![Page 2: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/2.jpg)
#forcewebinar
Safe Harbor
Safe harbor statement under the Private Securities Litigation Reform Act of 1995:
This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services.
The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of intellectual property and other litigation, risks associated with possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-Q for the most recent fiscal quarter ended July 31, 2012. This documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site.
Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
![Page 3: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/3.jpg)
#forcewebinar
Speakers
David
LiuTechnical Architect, MVP
@dvdkliu
LeeAnne
TemplemanDeveloper Evangelist
@leeanndroid
![Page 4: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/4.jpg)
#forcewebinar
Engage with the Community
@salesforcedevs / #Apex4Admins
Salesforce Developers
Salesforce Developers
The video will be posted to YouTube & the webinar recap page
(same URL as registration).
This webinar is being recorded!Success Community
![Page 5: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/5.jpg)
#forcewebinar
Have Questions?
Don’t wait until the end to ask your question! – Technical support will answer questions starting now.
Respect Q&A etiquette– Please don’t repeat questions. The support team is
working their way down the queue.
Stick around for live Q&A at the end– Speakers will tackle more questions at the end, time-
allowing.
Head to Developer Forums– More questions? Visit developer.salesforce.com/forums
![Page 6: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/6.jpg)
#forcewebinar
David’s Top Tips!
Attend all 3 #Apex4Admins webinars
Do tutorials & quizzes on SFDC99.com
Be active on the Success Community
Read “Head First Java”
Hard work beats talent
Find ways to make coding fun
![Page 7: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/7.jpg)
#forcewebinar
www.SFDC99.com
![Page 8: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/8.jpg)
#forcewebinar
Don’t Miss Out on Dreamforce 2014!
http://bit.ly/df14-apex4admins
$899 Discount Code:
D14DVLPR
![Page 9: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/9.jpg)
#forcewebinar
Introduction to Apex: Build on the Basics
Last Week Recap
Who should be tuning in?
SOQL
Cross Object Queries
Trigger Variables
Loop and IF Statements
![Page 10: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/10.jpg)
#forcewebinar
http://bit.ly/apex4admins-1
![Page 11: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/11.jpg)
#forcewebinar
Recap: Anatomy of a Trigger
Salesforce Keyword
Variable
Free Text Important!
![Page 12: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/12.jpg)
#forcewebinar
Recap: Anatomy of a Test Class
Salesforce Keyword
Variable
Free Text Important!
![Page 13: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/13.jpg)
#forcewebinar
POP QUIZ!
How does your Test Class know which Trigger to test?
If you can solve a business need using either a Trigger or a Workflow Rule, which should you use?
What is Trigger.new and why is it so important?
Workflow Rule! We always use clicks whenever possible.
Trick question – it doesn’t! Test classes must indirectly “trigger” triggers by doing actions that cause a trigger to fire. They never explicitely tell a trigger to run.
Trigger.new is a special list of every record that has entered your trigger. You’ll see this variable in every trigger that’s written.
![Page 14: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/14.jpg)
#forcewebinar
What is SOQL?
Salesforce Query language
When do we use it?
Use both SOQL & Apex in a Trigger
Cross-object actions
SOQL APEX
![Page 15: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/15.jpg)
#forcewebinar
You may have already used SOQL!
![Page 16: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/16.jpg)
#forcewebinar
Types of SOQL Queries
Basic
WHERE
Cross Object
![Page 17: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/17.jpg)
#forcewebinar
Types of SOQL Queries
AND & OR
AND
![Page 18: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/18.jpg)
#forcewebinar
Types of SOQL Queries
TEXT, PICKLIST, or ID values
NUMBERS
![Page 19: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/19.jpg)
#forcewebinar
Types of SOQL Queries
Dates
Fuzzy Matching
![Page 20: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/20.jpg)
#forcewebinar
Types of SOQL Queries
Limiting your results
Sorting your results
![Page 21: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/21.jpg)
#forcewebinar
What Is Our Query Asking For?
What TYPE of candy bar is our final query asking for???
First listener to guess via CHAT wins a Developer Prize Package!
![Page 22: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/22.jpg)
#forcewebinar
SOQL Query: Putting it all together!
![Page 23: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/23.jpg)
#forcewebinar
Where Can I Use SOQL?
Chapter 1:
• Data Loader • Simple queries
• Apex• Workbench
• workbench.developerforce.com/login.php
• Workbench is a coding playground!
![Page 24: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/24.jpg)
#forcewebinar
Exercise
Let’s write a SOQL Query!
![Page 25: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/25.jpg)
#forcewebinar
POP QUIZ!
Why do 95% of Triggers use SOQL?
Name THREE places you can write SOQL?
What are the TWO words that appear in every SOQL Statement?
Data Loader, Workbench, and Apex Triggers.
SOQL lets you do cross-object actions in a trigger. If you don’t need SOQL in your trigger, there is a strong chance you can use workflow instead.
SELECT and FROM
![Page 26: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/26.jpg)
#forcewebinar
Apex Fundamentals
Trigger Variables
IF Statements
Loops
![Page 27: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/27.jpg)
#forcewebinar
Trigger Variables
![Page 28: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/28.jpg)
#forcewebinar
IF Statements and Comparison Operators
![Page 29: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/29.jpg)
#forcewebinar
Trigger Quiz!!!
How much did David spend on Frozen merchandise???
First listener to guess via CHAT wins a Developer Prize Package!
![Page 30: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/30.jpg)
#forcewebinar
What is the final value of frozenSpend?
7.99
![Page 31: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/31.jpg)
#forcewebinar
Loops
![Page 32: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/32.jpg)
#forcewebinar
Exercise!
Let’s write a Trigger
![Page 33: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/33.jpg)
#forcewebinar
POP QUIZ!
What is ‘2’ + ‘2’ ?
What is the difference between = and == ?
One equals sign sets a variable to a value. Two equals signs checks to see if two values are equal and returns true or false.
22. Note that each of the numbers is wrapped in single quotes, which means we treat them as text. The result is also a string!
![Page 34: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/34.jpg)
#forcewebinar
Recap
Basic Trigger Recap
What is SOQL?
Where do we write SOQL?
Apex FUNdamentals
![Page 35: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/35.jpg)
#forcewebinar
So Where Do I Start?
Developer Edition Org
Sandbox– Change Sets
– Existing Customizations
DE vs Trial?
![Page 36: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/36.jpg)
#forcewebinar
Resources
Developer Forums – http://developer.salesforce.com/forums
SFDC99 – David’s Site
– http://sfdc99.com
Join the community– #Apex4Admins
![Page 37: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/37.jpg)
May 29nd Apex for Admins: Beyond the Basics!
http://bit.ly/apex4admins-3
• Principles of a good test class• Write your own deduping trigger• Combining SOQL and Apex Triggers• Learn more about becoming a #AdminWhoCodes
![Page 38: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/38.jpg)
Q & A
#forcewebinar
David
LiuTechnical Architect, MVP
@dvdkliu
LeeAnne
TemplemanDeveloper Evangelist
@leeanndroid
![Page 39: Apex for Admins: Beyond the Basics (Part 2)](https://reader037.fdocuments.us/reader037/viewer/2022103015/54c6609f4a7959a1788b45af/html5/thumbnails/39.jpg)
Survey
Your feedback is crucial to the successof our webinar programs. Thank you!
http://bit.ly/buildonbasics
#forcewebinar