Professional Documents
Culture Documents
BEGIN N ER TUTORIALS
LOGIN TO SFDC99
ABOUT ME
Beginner Tutorials
M A Y
1 6 ,
2 0 1 3
Anyone can learn how to write Apex no matter what their background is!
Follow this guide in order and I guarantee you will become a Salesforce developer.
Announcement!
Step-by-step guide to becoming a Salesforce developer this Summer!
0:00 / 6:15
0:00 / 7:37
P.S. Check out Salesforces official Dreamforce session on how to get started with Apex!
1/85
6/15/2014
2/85
6/15/2014
3/85
6/15/2014
Advanced Apex Programming this guy literally wrote the book on Apex!
226 Comments
Tom B.
JU NE 1 4 , 2 0 1 4 @ 5 :1 1 PM
Hi David,
Not sure where to post this question so I posted here
How do you get the Developer Console to remember all the logs and various settings? I noticed that
when I close all the logs, pages, etc. and go back into the console they come back along with other
settings that I changed!
Reply
Jonathan Bernd
JU NE 1 2 , 2 0 1 4 @ 1 0 :1 6 PM
Hi David
LIke you Im completely self-taught (and not nearly as young:)). You are a big encouragement. I got my
Developers certification about a year ago, and now (if I can find time) want to get Advanced Developer
asap. Im just ordering HeadFirst Java. Id be grateful if you could point me in any other ways to get this
knowledge expediently.
I also need to gain vf chops.
Thanks
Reply
http://www.sfdc99.com/beginner-tutorials/
4/85
6/15/2014
David Liu
JU NE 1 2 , 2 0 1 4 @ 1 1 :0 3 PM
Awesome stuff!!!
Force yourself to code! DEV 501 has plenty of Visualforce so you definitely need that
under your belt. Luckily VF is easy-ish to learn once you have the fundamentals
down in Head First Java. Standard documentation is plenty!
Basically find any excuse to code anything! You have all the resources you need to
learn right now but not enough experience!
Rep l y
Ankit Gupta
JU NE 1 1 , 2 0 1 4 @ 1 2 :0 2 A M
Hey David,
Hope you are doing good. Just a quick question on learnings from the first webinar.
My issue when i wrote a trigger:
In your trigger which you wrote, had 2 standard objects. What to do when you have 2 custom objects?
i am running the following trigger on Band object which would create a band member record. On band
member object there is a field which looks up to the band. Both Band and Band Member are custom
objects,
trigger Twitter on Band__c (after insert) {
for ( Band__c acc: Trigger.new )
{
Band_Members__c bandMember = new Band_Members__c();
bandMember.name = xyz@dasra.org;
bandMember.Twitter_handle__c = acc.Twitter_Handle__c;
bandMember.Band__c.Id= acc.Id;
insert bandMember;
}
}
this is throwing up the following error.
Error: Compile Error: Invalid foreign key relationship: Band_Members__c.Band__c at line 7 column 5
What do i do?? How do i get the correct id?
Reply
http://www.sfdc99.com/beginner-tutorials/
5/85
6/15/2014
David Liu
JU NE 1 1 , 2 0 1 4 @ 5 :1 1 PM
Ankit Gupta
JU NE 1 2 , 2 0 1 4 @ 3 :3 7 A M
6/85
6/15/2014
David Liu
JU NE 1 2 , 2 0 1 4 @ 1 0 :4 4 PM
Manav
JU NE 8 , 2 0 1 4 @ 2 :4 7 A M
Hii David
Actually i m a marketing guy and now i left my job. Because i want to become salesforce developer. But
i dont know how to start and will i be able to do this. i am so confused. Please help me.Please!!!
Reply
David Liu
JU NE 8 , 2 0 1 4 @ 8 :2 0 PM
I went down the exact same path! (You can read more in the About Me page)!
Start at the beginner tutorials and youll be a developer in no time!
http://www.sfdc99.com/beginner-tutorials/
Rep l y
http://www.sfdc99.com/beginner-tutorials/
7/85
6/15/2014
sreenu
JU NE 5 , 2 0 1 4 @ 5 :1 4 A M
hiii david
this is sreenu.actually i dont have any coding experience.i want become a good programmer.please
help me.how to i learn programming in simple way..what books are refferedplease tell mei am
waiting for your reply
Reply
David Liu
JU NE 8 , 2 0 1 4 @ 8 :2 9 PM
This page has everything you need to know, let me know if not!
http://www.sfdc99.com/beginner-tutorials/
Rep l y
Jithu
JU NE 5 , 2 0 1 4 @ 3 :1 2 A M
Hi David,
sorry! to say this i think i am enough prepared to write trigger on any task but the problem i face is that
the code length whereas other experts take 10 line of code and i take 20 for the same task can you help
me out from this. so that how can i make my code short and best??
Reply
David Liu
JU NE 8 , 2 0 1 4 @ 8 :2 6 PM
That will come over time! Try to read other peoples code and youll learn what
shortcuts they use =)
Shorter isnt always better the best code is the one thats easiest to understand,
http://www.sfdc99.com/beginner-tutorials/
8/85
6/15/2014
Jithu
JU NE 8 , 2 0 1 4 @ 1 0 :0 7 PM
Sumit Rana
JU NE 4 , 2 0 1 4 @ 9 :2 0 A M
Hi David,
Thanks for the reply. I did this with the workflow, but now want to do this through code.. just to
improve my coding skills and my knowledge.. Ill just look into things deeper now..
Thanks
Reply
Sumit Rana
JU NE 3 , 2 0 1 4 @ 1 0 :5 8 A M
Hi David,
Can you help me with this. I need to write a trigger to create and assign a dummy task to account
owner on account creation if reporting country of account owner is India
(The account owners reporting country is a tricky part for me) :(
Thanks
Reply
http://www.sfdc99.com/beginner-tutorials/
9/85
6/15/2014
David Liu
JU NE 3 , 2 0 1 4 @ 8 :0 9 PM
Barry
M A Y 3 1 , 2 0 1 4 @ 1 0 :3 9 A M
Hi David,
Your site is a great help, I am a beginner and this really helps.
On the Developer Edition I would like to add Quotes as an option on the Tabs at the top, cannot find
out how to do this. Can you please let me know how I can do this.
Thank you
Barry
Reply
David Liu
JU NE 1 , 2 0 1 4 @ 7 :2 1 PM
There is no standard Quotes tab =) You simply create them from the Opportunity!
Rep l y
Justin Wong
http://www.sfdc99.com/beginner-tutorials/
10/85
6/15/2014
Hi David, this is really great information that you have put together. I come from a Java background
and this really puts it in a great perspective how you can learn SFDC in more efficient manner. Couple
of questions that I have.
1. Do you use Eclipse? If so do you recommend using it?
2. How can we setup source control for SFDC?
Thanks,
Justin
Reply
David Liu
M A Y 2 8 , 2 0 1 4 @ 6 :4 1 PM
Most of the time I do use Eclipse! Nowadays though I find myself using the web ui or
developer console more and more. Theyre getting much better each release!
A lot of companies use source control (git, etc) but a surprisingly large amount dont
=) Salesforce doesnt do it out of the box so most companies just override their code
over and over! Havent set it up specifically but I would be shocked if there wasnt a
good tutorial on it somewhere on the web =)
David
Rep l y
sen
M A Y 2 7 , 2 0 1 4 @ 8 :0 9 A M
i believe you said i should not worry about the webinar if i am going through the chapters right? or
should i stop and watch webinars that you have posted. sorry if i asked this before!
Reply
David Liu
http://www.sfdc99.com/beginner-tutorials/
11/85
6/15/2014
Immerse yourself in code =) You will learn things in the webinar that are not taught
on this site, and vice versa! The small time investment will give you lots of ROI!
Rep l y
sen
M A Y 2 7 , 2 0 1 4 @ 8 :0 5 A M
david, can i use your free account to do your chapter exercises? also, if i wanted to just use the code
you do in your chapters i would just kinda copy that code and just paste and see if it runs just like you
show in your examples right?
last question is sandbox. do we as developers have to create a sanbox or is it created for us. i kinda
dont understand where a sandbox is and how to get there etc. the only thing i ever use is a freed
developer account on the free trail. i am plowing through your chapters as i stated to you =)
also when you deploy you have to do inbound and outboud change sets right? you can just do change
stets by using setup menu and then hitting deploy on whatever you have done in your sanbox.
getting this terminology down is my desire. like what is environment vs org and what is test org etc? I
saw your video series and i would like to commend your work! keep it up sir! i hope you become super
successful!
thanks!
Reply
David Liu
M A Y 2 7 , 2 0 1 4 @ 1 2 :5 5 PM
Take a second look at Chapter 1 all these things are covered Sen!
Rep l y
http://www.sfdc99.com/beginner-tutorials/
12/85
6/15/2014
Harsha
M A Y 1 9 , 2 0 1 4 @ 1 1 :1 1 A M
Hi David,
When will be the webinar video of May 15th session is available?
Reply
David Liu
M A Y 1 9 , 2 0 1 4 @ 7 :0 3 PM
Hhhmm dont know yet but Ill ask the crew when I see them this week!
Rep l y
Harsha
M A Y 2 0 , 2 0 1 4 @ 1 2 :0 2 A M
Thanks.
Reply
gousia
M A Y 1 9 , 2 0 1 4 @ 1 2 :3 4 A M
Hi David,
eagerly waiting for your next post on object oriented thinking.i learned triggers by practicing ur 1 to 7
chapters.now in the market who knows vf pages n triggers are getting jobs quickly.iam a jobseeker in
sfdc..so plzz post those lessions if u find free time.thanks alot for ur support.this is the best site to
learn sfdc till my all searches.so plzz try to post early
Thank u David.
Reply
http://www.sfdc99.com/beginner-tutorials/
13/85
6/15/2014
David Liu
M A Y 1 9 , 2 0 1 4 @ 7 :0 1 PM
Well done!!!
If you havent already read the book, give Head First Java a try as itll teach you
object oriented thinking!
Going as fast as I can hahaha
Rep l y
Anonymous
M A Y 2 2 , 2 0 1 4 @ 4 :2 7 PM
Hi David
Im a Java programmer but interested to learn Apex. Do I still need to read this book?
Thanks
Reply
David Liu
M A Y 2 2 , 2 0 1 4 @ 5 :1 3 PM
Ofelia H. Ladao
M A Y 1 7 , 2 0 1 4 @ 8 :4 5 A M
http://www.sfdc99.com/beginner-tutorials/
14/85
6/15/2014
Hi David,
Reply
David Liu
M A Y 1 7 , 2 0 1 4 @ 1 0 :2 7 A M
Hi Ofelia =)
Rep l y
Chris Kim
M A Y 1 5 , 2 0 1 4 @ 9 :3 4 PM
YOU rock man! My Java book is arriving tomorrow and I will be reading away and taking be on this site
all weekend! Quick question, will you have something for us to become a developer of VisualForce? I
understand it can use HTML and or Javascript?
Reply
David Liu
M A Y 1 7 , 2 0 1 4 @ 1 0 :4 8 A M
Visualforce is coming up right after I talk about something even more important
object oriented thinking!
Rep l y
Paul
M A Y 1 5 , 2 0 1 4 @ 8 :5 8 A M
http://www.sfdc99.com/beginner-tutorials/
15/85
6/15/2014
Hi, firstly thanks so much for creating sfdc99, what a great find!
Ive just started looking at Apex today as I need to go beyond the point-and-click adventure I have had
so far with Salesforce. Working for a UK charity with no budget means I am reliant on self education
and this site has helped enormously, but.
At the risk of preempting Chapter 9 I have a specific requirement and Id appreciate your comment on
my proposed solution:
We have a thriving web site (www.nfm.org.uk) with a web form to allow prospective clients to self-refer
(referral form). Currently that form gets emailed to the admin team and copied into Salesforce. The
form software can write directly to Salesforce so I set up a custom object to receive the data
(Web_Referrals). Now I need to copy that data to 2 existing objects to create Case and 2 Clients
linked (master-child) to that Case assuming the data is ok.
So I thought just stick a custom button on the Web_Referrals detail screen, write some Javascript to call
an Apex class/method. Ive written some dummy code to emulate creating a case but cannot work out
how to reference the Referrals fields in the Apex code.
Am I going about this the right way? Ive googled it to death but cannot find the answer so any
tips/advice/pointers to other resources would be welcomed,.
Javascript:
{!REQUIRESCRIPT(/soap/ajax/15.0/connection.js)}
{!REQUIRESCRIPT(/soap/ajax/15.0/apex.js)}
sforce.apex.execute(createWebReferralCase, createNewCase, {});
window.alert(Case Created);
Class:
global class createWebReferralCase
{
WebService static void createNewCase()
{
Mediation_Case__c caseToCreate = new Mediation_Case__c();
// add some data
caseToCreate.Name = Web_Referral__c.C1_Last_Name__c; // doesnt work!
caseToCreate.Referral_Date__c = date.today();
// insert the new case
insert caseToCreate;
}
}
Reply
Paul
M A Y 1 6 , 2 0 1 4 @ 2 :3 1 A M
Please ignore this, I did find the answer eventually via the developer forum. I enjoyed the first
http://www.sfdc99.com/beginner-tutorials/
16/85
6/15/2014
sameer
M A Y 1 5 , 2 0 1 4 @ 1 :3 5 A M
hii david,
i am beginner in salesforce, i want to ask u 1 que.
can we convert read only field instead of required field in standard field through page layout??
Reply
David Liu
M A Y 1 5 , 2 0 1 4 @ 2 :2 5 PM
You sure can just need to lock the field on the page layout editor! Depending on
your use case you can also use a validation rule.
Rep l y
Kevin
M A Y 1 4 , 2 0 1 4 @ 3 :5 5 PM
Hi David!!! I just finished your tutorials a couple of weeks ago, they are amazing!!! Thank yo much.
I was wondering if you can answer me a question is it possible to access an apex:inputHidden on a
VF page from the controller??
Reply
http://www.sfdc99.com/beginner-tutorials/
17/85
6/15/2014
David Liu
M A Y 1 5 , 2 0 1 4 @ 2 :2 6 PM
Yup should be possible but need to understand your use case as there may be a
better solution!
Rep l y
Nitin Saxena
M A Y 1 3 , 2 0 1 4 @ 1 0 :3 1 PM
For those who are very new to the Salesforce.com , You can refer Salesforce Fundamentals Help
document here : http://www.salesforce.com/us/developer/docs/fundamentals/index.htm
I found it useful, thought to share :)
Reply
David Liu
M A Y 1 3 , 2 0 1 4 @ 1 1 :3 9 PM
Srinivasan.S
M A Y 7 , 2 0 1 4 @ 1 :2 1 PM
Hi David,
I have worked as a windows admin.When I came to know about Salesforce and its development and
demand,I want to become a Salesforce developer like you.I want tom follow your path for that so I have
started you steps.I want to become Salesforce developer this summer and want to participate in this
years Dreamforce Event.Please guide for my dream.
http://www.sfdc99.com/beginner-tutorials/
18/85
6/15/2014
David Liu
M A Y 7 , 2 0 1 4 @ 9 :5 8 PM
gousia
M A Y 3 , 2 0 1 4 @ 7 :3 6 PM
Hi David,
In everyones mind there will be a doubt when to use before vs after triggers.the way u expalined is
excellent .i dont have words to tell, how much these lessions r helping me and building confidence in
me.
i have so many doubts in apex classes and vf pages.if possible please write those lessons alsoas they
r most imp in interview point of view.
Thanks in advace.Thanks alot for ur tutorials.
Reply
David Liu
M A Y 6 , 2 0 1 4 @ 1 0 :5 6 PM
http://www.sfdc99.com/beginner-tutorials/
19/85
6/15/2014
Sen
M A Y 2 , 2 0 1 4 @ 1 2 :4 5 PM
David Liu
M A Y 2 , 2 0 1 4 @ 1 0 :1 9 PM
Some of these questions are way too advanced for you to worry about right now
hahaha. Once youre comfortable with topics in chapters 0 7 you can begin
researching these things!
Think of brackets as simply layers of code. Youll become more comfortable with it
http://www.sfdc99.com/beginner-tutorials/
20/85
6/15/2014
Sen
M A Y 5 , 2 0 1 4 @ 5 :0 9 A M
David i think i will do this. I will follow what you say rather than asking questions.
so lets do this step by step.
first step is
do chapters 0-7? correct? i will be able to grasp this without that javabook? the only
reason i showed those video is because i cant but that java book and i need to start
some learning and not waste timeetc.
so anyway, say yes/no to the step i mentioned and then we will do next step. like that
you can guide me and i wont ask anything else until i complete that step.
do you like this idea sir?
Sincerely,
Sen
Reply
David Liu
M A Y 6 , 2 0 1 4 @ 1 0 :5 8 PM
hahaha yes Sen! And no need to call me sir, I am simply your friend who
is still learning as well =)
Rep l y
http://www.sfdc99.com/beginner-tutorials/
21/85
6/15/2014
Sen
M A Y 7 , 2 0 1 4 @ 2 :2 2 PM
Thanks. I will contact you after i am done with chapter 7. would that be
enough knolwedge to start as a noob developer in a company ? =) Is your
webinar about these chapters? should i watch it or continue with this stuff
as you suggested.
David Liu
M A Y 7 , 2 0 1 4 @ 9 :5 9 PM
Sen
M A Y 2 , 2 0 1 4 @ 1 2 :3 2 PM
22/85
6/15/2014
3) lastly if i follow your guide from chapter 0 to the bottom would i have adequate skills to go as entry
level developer? i am using your beginner tutorial to prepare i have no previous code experience and
not much admin experience.
am i fool for trying =)
thanks for your help!
Sincerely,
newbie
Reply
David Liu
M A Y 2 , 2 0 1 4 @ 1 0 :1 5 PM
Hey Sen,
I totally understand that you want to learn Apex as quickly as possible. Thats why I
made this site so that you could focus on just the important lessons and avoid all
the unnecessary stuff.
Check out this post for a step-by-step guide to learning:
http://www.sfdc99.com/2014/04/28/step-by-step-guide-to-becoming-a-salesforcedeveloper-this-summer/
Please, I beg you, put in the time to study and dont take any shortcuts. The only
person you end up cheating is yourself! You can be a developer by the end of
Summer. Thats really quick and its going to change your entire life! 5 10 hours a
week for a few months is all it takes.
Resiliency is your #1 skill as a developer!
http://www.sfdc99.com/2014/04/23/what-is-resiliency/
Life is all about priorities Sen. There are going to be times where youll have to
prioritize learning code versus having fun, hanging out with friends, partying, etc.
The small choices you make in these scenarios will add up over time and determine
where you end up in life!
I will help you every step of the way Sen. But I can only point you in the right
direction. Study. Work hard! Help me help you! I believe you can do it =)
David
Rep l y
Pingback: Salesforce Developer Skills Lead to Dream Job - SkyOffice Consulting | SkyOffice
http://www.sfdc99.com/beginner-tutorials/
23/85
6/15/2014
Consulting
Srinivas
A PRIL 2 2 , 2 0 1 4 @ 5 :0 3 A M
Hi david,
This is Srinivas,May i know how to create a field in an object by using apex tags..? u understand my
question right>creating fields to an newly created object..Thanks in advance.
Thanks,
Srinivas
Reply
Pankaj Kumar
A PRIL 2 1 , 2 0 1 4 @ 1 2 :3 7 PM
Hi David, Amazing postswished, all the topics you mentioned above was covered.Waiting for them to
come in future is a bit painful.But, thankx for all the Hard effort you are putting in explaining ur
followers on this site. I have a basic question related to deployment. When deplying from Sanbox to
Production we need overall coverage of 75% minimum. Is this code coverage limit same for Sanbox to
sandbox org. Or we can deploy without 75% overall code coverage.
Reply
David Liu
A PRIL 2 1 , 2 0 1 4 @ 8 :2 4 PM
Time flies =) I still remember struggling to write the first chapters a few months ago,
and here we are today!
Focus on learning the concepts up to Chapter 7 very deeply! The rest is easy =)
Sandbox to sandbox doesnt require any code coverage, so youre good to go!
David
Rep l y
http://www.sfdc99.com/beginner-tutorials/
24/85
6/15/2014
swan
A PRIL 2 0 , 2 0 1 4 @ 5 :3 5 A M
Hi David,
Gud morning.
I am new bie to salesforce planning to learn salesforce seeing the job market is high. But i dont know
programming so was wondering what percentage of programming does salesforce developer course
includes .
I am worried if this is right choice to choose salesforce as career can non programmer learn the
developer course.
please provide ur inputs. will be gratefull.
awaiting for the reply!!
Thanks
Reply
David Liu
A PRIL 2 0 , 2 0 1 4 @ 3 :0 8 PM
hugh
A PRIL 2 1 , 2 0 1 4 @ 9 :0 7 A M
Great stuff You must be a mind reader just starting out as a salesforce developer the market
is defo hot.. Hope you the the last few links added. Thanks mate
Reply
http://www.sfdc99.com/beginner-tutorials/
25/85
6/15/2014
David Liu
A PRIL 2 1 , 2 0 1 4 @ 8 :2 0 PM
Harsha
A PRIL 1 8 , 2 0 1 4 @ 1 1 :5 3 PM
Hi David
This is a wonderful website for beginners like myself , i have followed the steps mentioned in here and
have managed to successfully run the test class, but my question is , how do i put this code in to use, i
mean in real time , like when the class is executed new user should be created,i am using the free
developer edition and dont have access to sandbox.
Really appreciate your efforts.
Thanks in advance.
Reply
David Liu
A PRIL 1 9 , 2 0 1 4 @ 1 2 :0 1 A M
If you have access to an Enterprise Edition of Salesforce you can deploy it using the
steps in this chapter!
Otherwise you cant deploy from a free developer edition! Dont worry though, that
part is easy so youre not missing out!
David
Rep l y
http://www.sfdc99.com/beginner-tutorials/
26/85
6/15/2014
Srinivas
A PRIL 1 7 , 2 0 1 4 @ 1 0 :2 0 A M
Hi David,
May i Know how to create radio button???please let me know thatthanks in advance..
Reply
David Liu
A PRIL 1 7 , 2 0 1 4 @ 8 :5 4 PM
Srinivas
A PRIL 1 8 , 2 0 1 4 @ 1 2 :5 5 A M
Pradeep Naredla
A PRIL 1 4 , 2 0 1 4 @ 8 :3 3 PM
hai mate,
actually i have a query can u pls help me.
my question is how to represent the campaign lookup field in lead can u pls tell me the api name of
that.
Reply
http://www.sfdc99.com/beginner-tutorials/
27/85
6/15/2014
David Liu
A PRIL 1 4 , 2 0 1 4 @ 8 :3 7 PM
Here you go =)
[SELECT Id, LeadId, CampaignId FROM CampaignMember WHERE LeadId =
'0123456789'];
If you must do it from Leads:
[SELECT Id, (SELECT Id, CampaignId FROM CampaignMembers ORDER BY CreatedDate
ASC LIMIT 1) FROM Lead WHERE LeadId = '0123456789'];
Go get em!
David
Rep l y
hima bindu
A PRIL 1 3 , 2 0 1 4 @ 7 :3 8 A M
hi , i am new to sfdc, this blog is v helpful..but i can see only 7 chapters, to see chaper 8 do i need any
extra privilege or it is yet to be posted??
Reply
David Liu
A PRIL 1 3 , 2 0 1 4 @ 8 :5 0 PM
Still working on writing them Hima (sorry!). I usually write 2 3 posts a week!
Rep l y
Xavier
http://www.sfdc99.com/beginner-tutorials/
28/85
6/15/2014
HI, David. Thank you for sharing your knowledge in such an easy to understand form. I get excited
whenever you have a new entry up.
Reply
David Liu
A PRIL 7 , 2 0 1 4 @ 7 :3 5 PM
Tony Thoman
A PRIL 4 , 2 0 1 4 @ 6 :5 4 A M
David, I am new to salesforce development and have been tasked with keeping an existing ERP systems
Contacts in sync with any new contact entered into to Salesforce. Can this be accomplished with an
After Insert trigger and would this be the best approach for such an operation? Thanks, Tony
Reply
David Liu
A PRIL 4 , 2 0 1 4 @ 1 0 :3 5 PM
An after trigger could certainly do this, but this project is much bigger than you
might expect!
Integrations are best left to tools like Boomi:
http://www.boomi.com/
I would only recommend coding your own integration if youre very comfortable with
code, IE coding chapter 7 triggers in your sleep!
Rep l y
http://www.sfdc99.com/beginner-tutorials/
29/85
6/15/2014
Matt Santy
M A RC H 3 1 , 2 0 1 4 @ 8 :3 6 A M
Hey David, please feel free to shoot me an email of your chapter drafts if you want any help with text
editing, code scenarios, or just a second set of eyes. Keep it UP!!!
Reply
David Liu
M A RC H 3 1 , 2 0 1 4 @ 5 :5 9 PM
Sanjay
M A RC H 2 5 , 2 0 1 4 @ 2 :5 5 PM
David Liu
M A RC H 2 6 , 2 0 1 4 @ 4 :3 6 A M
Hey Sanjay,
Sometimes you need to make large database changes that arent possible due to the
Governor Limits in a trigger.
For example, you might have an integration with an external system where all
records need to be synced at least on a daily basis. You couldnt do this with a
http://www.sfdc99.com/beginner-tutorials/
30/85
6/15/2014
trigger because youd run into a 50,000 record limit. However with batch Apex, you
have much larger limits and can do this no problem!
Since you wouldnt want to manually call your batch Apex every night, youd use
scheduled Apex to automatically call your batch Apex every day.
Hope this helps!
David
Rep l y
sanjay kumar
M A RC H 2 6 , 2 0 1 4 @ 3 :1 6 PM
David Liu
M A RC H 2 7 , 2 0 1 4 @ 1 2 :5 5 A M
Hey Sanjay,
You definitely want to check out this post!
http://www.sfdc99.com/2013/05/14/how-to-write-a-test-class/
You can look at the Extended look link at the bottom if you want even
more detail =)
The 75% number is simply a random cutoff that Salesforce chose. In a
http://www.sfdc99.com/beginner-tutorials/
31/85
6/15/2014
lot of cases its impossible to reach 100% code coverage. For example,
you might have a trigger that runs 1,000 different scenarios depending
on certain conditions. To test all 1,000 would be crazy, so Salesforce
lowered it and make it only 75% of all possible lines of code.
If your coverage is under 75% it simply means at least 25% of the lines
of code in your trigger never ran. Youd need to write more tests to
make those run!
Hope this helps!
David
Test class
Rep l y
sanjay
M A RC H 3 0 , 2 0 1 4 @ 1 :0 4 PM
Thanks Bro!
David ,can we design a complete website using Vf coding (Vf pages combined
together) and is it compulsory,if i have designed it for my customers,they also
have login first in salesforce then they can access my site.for e.g-i run a grocery
store ,i want my customers to purchase grocery online using my website and i
have designed a website using VF pages and apex classes and i want my end
users to access it.is it possible,if they can access it across internet and no need
to login first in salesforce.?Please explain.
thanks
Reply
David Liu
M A RC H 3 1 , 2 0 1 4 @ 6 :5 4 PM
Hey Sanjay,
I know this is definitely possible however I have no experience in
this area! Try Site.com perhaps!
David
http://www.sfdc99.com/beginner-tutorials/
32/85
6/15/2014
sanjay
M A RC H 2 3 , 2 0 1 4 @ 4 :0 8 A M
The page gets refreshed everytime ,i click on Sum Button.I want that page should not get refreshed
when i hit for Sum Button,what changes shall i make.
My class looks like:
public class AddNumbers
{
public integer a{set;get;}
public integer b{set;get;}
public integer c{set;get;}
public void add()
{
c=a+b;
}
}
VF Page
Regards,
Sanjay Kumar
Reply
David Liu
M A RC H 2 3 , 2 0 1 4 @ 1 1 :5 6 A M
Hey Sanjay,
Visualforce code in comment doesnt render well!
Without knowing your code, what you probably want to do is add a rerender
element on your command button. The rerender should point to the outputpanel
containing your Sum field.
Good luck!
David
Rep l y
http://www.sfdc99.com/beginner-tutorials/
33/85
6/15/2014
Code Riders
A PRIL 1 7 , 2 0 1 4 @ 1 :3 9 A M
Hi sanjay ,
read the below.
A button that is rendered as an HTML input element with the type attribute set to
submit, reset, or image, depending on the tags specified values. The button executes
an action defined by a controller, and then either refreshes the current page, or
navigates to a different page based on the PageReference variable that is returned by
the action.
IF you dont want to get the page refreshed then u might use the HTML input
buttoninstead of apex:button
Reply
David Liu
A PRIL 1 7 , 2 0 1 4 @ 8 :5 2 PM
Thanks!
Rep l y
sanjay
M A RC H 2 3 , 2 0 1 4 @ 4 :0 4 A M
The page gets refreshed everytime ,i click on result Button.I want that page should not get refreshed
when i hit for result, button,what changes shall i make.
My class looks like:
public class AddNumbers
{
public integer a{set;get;}
public integer b{set;get;}
public integer c{set;get;}
public void add()
{
c=a+b;
}
}
http://www.sfdc99.com/beginner-tutorials/
34/85
6/15/2014
prem kumar
M A RC H 1 9 , 2 0 1 4 @ 1 2 :0 9 PM
David thank u so much, i just started learning and i am feeling so confident now.
when will you update chapter 7 waiting for them. eagerly waiting for the integration part.
Reply
David Liu
M A RC H 1 9 , 2 0 1 4 @ 9 :4 3 PM
jenish shingala
M A RC H 1 9 , 2 0 1 4 @ 1 2 :0 2 A M
http://www.sfdc99.com/beginner-tutorials/
35/85
6/15/2014
David Liu
M A RC H 1 9 , 2 0 1 4 @ 9 :4 2 PM
Hey Jenish,
I havent yet written them =(
David
Rep l y
Ayan Hore
M A RC H 1 8 , 2 0 1 4 @ 6 :3 2 A M
Reply
David Liu
M A RC H 1 8 , 2 0 1 4 @ 7 :1 8 PM
Ayan Hore
M A RC H 1 8 , 2 0 1 4 @ 5 :1 2 A M
Hi Yaniv,
As far as my understanding on #9 goes, Salesforce does some native rendering automatically once you
http://www.sfdc99.com/beginner-tutorials/
36/85
6/15/2014
access the application from mobile (Salesforce1). For that you need to enable some options in your
settings (mobile settings, Salesforce1, etc).
Apart from that, when you create VF pages, you will see an option (checkbox) to enable it for mobile
rendering as well (since VF pages are customized, so standard SFDC mobile rendering will not apply for
them unless you select that checkbox).
Also I found some device level tags like below that you can use:
Also, you can trim off the header and the sidebar from your VF page for better viewing in mobile.
Im sure there are some more details, just do some googling and you will get it.
Let me know if it helps!
~Ayan
Reply
David Liu
M A RC H 1 8 , 2 0 1 4 @ 7 :1 7 PM
Bernard Mesa
M A RC H 1 4 , 2 0 1 4 @ 1 2 :5 6 PM
Hello!
Im a developer working in SalesForce. Thank you so much for this site! I generally find it difficult to get
decent help with developing in SalesForce, but your site is amazing! Thank you!
Reply
David Liu
M A RC H 1 5 , 2 0 1 4 @ 1 1 :3 3 A M
My pleasure Bernard! Very exciting announcement about the site coming up!!
http://www.sfdc99.com/beginner-tutorials/
37/85
6/15/2014
Athena
M A RC H 1 3 , 2 0 1 4 @ 1 :4 9 A M
Hi David,
Your Site helped a lot.Thanks for guiding!!
Want some sites or materials from where i can study -to pass ADM201?please help!! The sites I found
were 2-3 years old so will not help me with current exam since sales force updating every season.
Reply
David Liu
M A RC H 1 3 , 2 0 1 4 @ 9 :5 4 PM
Hey Athena,
Check out Quizlet.com and search for flashcards related to ADM201! I passed four
certifications studying almost exclusively off this strategy.
David
Rep l y
Anonymous
M A RC H 1 4 , 2 0 1 4 @ 5 :4 2 A M
Thanks:)
Reply
http://www.sfdc99.com/beginner-tutorials/
38/85
6/15/2014
Mayank Jain
M A RC H 1 3 , 2 0 1 4 @ 1 :2 3 A M
Hi David,
I have a requirement that through custom VF page i am editing Account information like Account
Name, Account Owner,Parent Account etc.
So I have created a Custom VF page but now I want to add condition to display different fields based on
the Account Record type.
AS their are two record types in Account :
1) Person Account: In this type of account First Name and Last name is required.
2) Business Account: In this Account Name is required.
So I want to display First name and Last name when admin select Record Type =Person Account and
display Account Name when admin select Record Type =Business Account. in VF page.
Reply
David Liu
M A RC H 1 3 , 2 0 1 4 @ 9 :5 3 PM
Mayank Jain
M A RC H 1 3 , 2 0 1 4 @ 1 0 :3 3 PM
Hi David,
Could you please give some examples on rendering or some sample code.As I am
new in SFDC.
Reply
David Liu
http://www.sfdc99.com/beginner-tutorials/
39/85
6/15/2014
Yaniv
M A RC H 1 1 , 2 0 1 4 @ 9 :3 6 PM
Hi David Liu,
i am Yaniv myself, appreciate your work here.
i would like to know some details mentioned below.
1. What is Standard Set Controller. In which scenario it will use?
2. What is the purpose of Grant option in OWDs?
3. How to control the Workflow actions in Triggers?
4. How to load both the master and detail records at a time into database using SOQL query?
5. How to create Wizards in Salesforce?
6. What is the admin permission exist in PROFILEs to enable/disable DEBUG MODE option?
7. How to upload documents using Data Loader?
8. What is OAUTH and purpose in Salesforce?
9. What are all the changes needed in Visualforce pages and Apex classes to convert a web application
to a mobile application?
10. What are Analytics in Salesforce?
i am thankful for your valuable response.
Reply
David Liu
M A RC H 1 1 , 2 0 1 4 @ 9 :4 2 PM
Thats a lot of questions Yaniv very curious where they came from!!
Maybe some of these are good interview questions, hahaha.
http://www.sfdc99.com/beginner-tutorials/
40/85
6/15/2014
Anyway, I cant help you with all of them but the good news is you can probably
Google most of the answers. I wrote a sweet post of #4 though check it out!
http://www.sfdc99.com/2013/06/24/example-how-to-write-a-cross-object-soql-querypart-2/
David
Rep l y
Yaniv
M A RC H 1 2 , 2 0 1 4 @ 6 :3 4 A M
Hi David Liu,
Your guess is correct. I am looking for new opportunities and mentioned are some of
the Qs I faced. Sure that I will get answers from Google for all. Need your help for
below mentioned 3 questions for which i didnt find correct one.
5. How to create Wizards in Salesforce?
Per my understanding, can write VFPs that resembles Wizards in execution. But there
is no direct option in Salesforce to create Wizards. Please correct me if I am wrong.
6. What is the admin permission exist in PROFILEs to enable/disable DEBUG MODE
option?
Per my understanding, there is no option or administrative setting in PROFILE to
enable/disable the debug mode.
9. What are all the changes needed in Visualforce pages and Apex classes to convert
a web application to a mobile application?
Thanks for your valuable response.
Reply
David Liu
M A RC H 1 2 , 2 0 1 4 @ 8 :0 8 PM
41/85
6/15/2014
9. Never done this before so cant give a good answer sorry!! My guess
is very little!
Rep l y
gopsal
M A RC H 6 , 2 0 1 4 @ 9 :1 8 A M
Hi David,
Currently I am working as Testing engineer. I am planning to learn salesforce development. Can you
please guide me how to start with sales force.
Please Thanks in advance.
Reply
David Liu
M A RC H 6 , 2 0 1 4 @ 9 :5 3 PM
Kenneth Ray
M A RC H 2 , 2 0 1 4 @ 9 :4 4 PM
David, I just want to say I love the site!!!! Thanks for ALL your help!!!
Reply
http://www.sfdc99.com/beginner-tutorials/
42/85
6/15/2014
David Liu
M A RC H 3 , 2 0 1 4 @ 1 0 :2 6 PM
Hamed Mohiuddin
FE B RU A RY 2 0 , 2 0 1 4 @ 1 0 :4 3 A M
Hey David,
I am functional admin trying to get into the development realm. Having a tough day at my job where I
have to
1. Hide a Contact Name custom field on opportunity object on the detail page
2. Based on the Contact name I have to create a Contact Role on the Opp marked as primary and set a
role
3. Create a contact role on opp when its created from the Contact Object
Now I know for the first one I need to create Visual force page and add to the standard opportunity
page layouts. However, I have never written a VF page before
and I need some direction in the next 2 as well.
Please help! I have started writing beginner level code (triggers) thanks to you, but I think the abov eis
way beyond my understanding right now. Please privde some direction as to where and how I should
get started.
Thanks
Best,
Hamed
Reply
David Liu
FE B RU A RY 2 0 , 2 0 1 4 @ 9 :2 9 PM
Hey Hamed,
http://www.sfdc99.com/beginner-tutorials/
43/85
6/15/2014
Jameel
FE B RU A RY 1 2 , 2 0 1 4 @ 8 :1 0 A M
Hi, I am Very new to SF I need to do automatically convert lead to opportunity. If contact is not exist
we need to create new contact, if contact is exist we need not create contact, and this lead
automatically convert into opportunity.
Please provide trigger code for this solution.
Thanks in advance.
Reply
David Liu
FE B RU A RY 1 2 , 2 0 1 4 @ 7 :0 2 PM
http://www.sfdc99.com/beginner-tutorials/
44/85
6/15/2014
Jameel
FE B RU A RY 1 3 , 2 0 1 4 @ 4 :4 4 A M
Hi David,
I have taken below this code form net.
trigger ConvertLead on Lead (after insert, after update) {
for (Lead lead : Trigger.new) {
if (lead.isConverted == false) //to prevent recursion
{
Database.LeadConvert lc = new Database.LeadConvert();
lc.setLeadId(lead.Id);
String oppName = lead.Name;
lc.setOpportunityName(oppName);
LeadStatus convertStatus = [SELECT Id, MasterLabel FROM LeadStatus WHERE
IsConverted=true LIMIT 1];
lc.setConvertedStatus(convertStatus.MasterLabel);
Database.LeadConvertResult lcr = Database.convertLead(lc);
System.assert(lcr.isSuccess());
}
}
}
this is converting lead to opportunity but not immediately. After adding lead this
code executed and Converted Lead page showing with contact, account and
Opportunity values. After clicking this value only this record move to opportunity.
Why we need to click, after that only record move to contact , account , opportunity. I
need auto convert.
Please advise.
Reply
David Liu
FE B RU A RY 1 4 , 2 0 1 4 @ 6 :3 5 PM
Hey Jameel,
So the Lead is actually converted immediately after you create the lead
http://www.sfdc99.com/beginner-tutorials/
45/85
6/15/2014
Pavan
FE B RU A RY 1 1 , 2 0 1 4 @ 9 :3 8 PM
Kay
FE B RU A RY 9 , 2 0 1 4 @ 5 :2 4 PM
Hi David,
Just wanted to leave a quick message of appreciation, i am also a Junior dev and still learning the
ropes, you have covered a lot of core information which is great, I have recommended this to many
colleagues and will continue to do so!
I look forward to chapter 9!
Reply
http://www.sfdc99.com/beginner-tutorials/
46/85
6/15/2014
David Liu
FE B RU A RY 1 0 , 2 0 1 4 @ 7 :0 9 PM
Pavan
FE B RU A RY 9 , 2 0 1 4 @ 4 :1 0 PM
Hello David
I just started my coding on Apex. I have a problem in accessing ProductFamily, which is a pick list from
the Visual Force Page. I have written the Custom Controller. But Still I am not able to get my
ProductFamily fields in the picklist. Its null and I am getting null pointer exception.
My COntroller is as follows
public without sharing class UserController
{
public List UserTemp = new List();
public UserController()
{
}
public List UserList
{
get
{
UserTemp = [Select Name, ProductCode,Family From Product2];
UserList = new List();
for(Product2 temp : UserTemp)
{
UserList.add(new SelectOption(temp.Family, temp.Name));
}
return UserList;
}
set;
}
}
and My Visual Force Code is as follows
http://www.sfdc99.com/beginner-tutorials/
47/85
6/15/2014
David Liu
FE B RU A RY 1 0 , 2 0 1 4 @ 7 :1 5 PM
Heres my advice!
Try hardcoding Family values first just to see if its working at all!
If its not, you know youre not accessing the data correctly with your Visualforce.
If it is, then there is something incorrect with your SOQL query! Try doing your query
in a tool like Workbench to see the output!
Hope this helps!
David
Rep l y
Pavan
FE B RU A RY 1 1 , 2 0 1 4 @ 1 0 :5 5 A M
I tried that bro. Now using the standard controller to display the picklist values. But
after I choose a picklist, one more list should be displayed, based on the selected
value. I am not finding how to do this.
Regards,
Pavan
Reply
David Liu
FE B RU A RY 1 1 , 2 0 1 4 @ 9 :3 1 PM
http://www.sfdc99.com/beginner-tutorials/
48/85
6/15/2014
Pavan
FE B RU A RY 1 2 , 2 0 1 4 @ 7 :4 9 A M
David Liu
FE B RU A RY 1 2 , 2 0 1 4 @ 7 :0 1 PM
Zen
JA NU A RY 3 1 , 2 0 1 4 @ 6 :3 7 A M
is there really demand for simply admin people in the market? feel like people want developers or
admins who code etc? would i be able to get a job as simply admin. i mean i can learn code later if i
want on my own time but i feel like focus on one thing at time you know?
Reply
David Liu
JA NU A RY 3 1 , 2 0 1 4 @ 8 :1 6 PM
I agree thats its best to learn the admin stuff first. You cannot be a good developer
without being very good as an admin!
Market for both right now is hot but its a little better for devs. In the end, you need
http://www.sfdc99.com/beginner-tutorials/
49/85
6/15/2014
to choose what you enjoy the most, because youll be spending 40+ hours a week
doing it!
Rep l y
Zen
JA NU A RY 3 0 , 2 0 1 4 @ 8 :5 1 A M
Thank you for your patience and your kind and informative responses! I wish you a good 2014 my
friend!
Reply
Zen
JA NU A RY 2 9 , 2 0 1 4 @ 8 :1 9 A M
Hey!
sorry! absolute last question!
i cant seem to find the checkout enabled box for my user detail page. it told my to give manage billing
permission first and i did that at my sys admin profile but then when i wen to my user detail page the
checkout enable box is not there.
this checkout is to allow user to purchase additional license as you know.
info
i am using free developer account. license is salesforce.
thank you and sorry for the questions!
Reply
David Liu
JA NU A RY 2 9 , 2 0 1 4 @ 8 :2 7 PM
http://www.sfdc99.com/beginner-tutorials/
50/85
6/15/2014
Zen
JA NU A RY 2 9 , 2 0 1 4 @ 7 :3 5 A M
last question
what is a org that you refrred to? is org the company you are hired and working with?
also with regards to code..
i barely know it or code stuff and am going fro admin right now.
Do i need sql/soql query languages for admin work or does that come later when i become a developer
etc? what is the breadth of code needed for admin work? i assumed business logic like workflow,
validation rules would be enough. i guess conditional statements like basic if then statements are all
you need. i am assuming apex library and java not really needed? i was told you need triggers along
with everything i stated.
planning on go for developer after admin so i have asked you.
Thanks again!
Sincerely,
Zen
Reply
David Liu
JA NU A RY 2 9 , 2 0 1 4 @ 8 :2 6 PM
Hey Zen,
An org is simply the Salesforce that you are logging in to =)
No need to know Apex, sql/soql, or triggers if you simply want to be an admin! Zero
code and zero code reading! 90% of people are simply admins!
David
Rep l y
http://www.sfdc99.com/beginner-tutorials/
51/85
6/15/2014
Zen
JA NU A RY 2 9 , 2 0 1 4 @ 7 :3 0 A M
David Liu
JA NU A RY 2 9 , 2 0 1 4 @ 8 :2 5 PM
Hey Zen,
An instance is your Salesforce that your users log in to!
Profile permissions are shared across all users!
Permission sets are if you want to assign a permission to just one person!
Feature licenses are per user!
David
Rep l y
http://www.sfdc99.com/beginner-tutorials/
52/85
6/15/2014
zen
JA NU A RY 2 8 , 2 0 1 4 @ 2 :4 2 PM
hello
Reply
David Liu
JA NU A RY 2 8 , 2 0 1 4 @ 8 :2 5 PM
Hi =) I get a lot of spam comments so I need to approve all comments before they
show up! I promise Im reading!
Rep l y
zen
JA NU A RY 2 8 , 2 0 1 4 @ 8 :2 2 A M
http://www.sfdc99.com/beginner-tutorials/
53/85
6/15/2014
David Liu
JA NU A RY 2 8 , 2 0 1 4 @ 8 :2 4 PM
piyush
JA NU A RY 2 5 , 2 0 1 4 @ 5 :0 6 A M
Dear David,
I need to create the following task only with trigger:
1. There is a Custom Object A with two child objects A1 and A2.
2. Each child objects has a mutiselect picklist field.
3. A1 has picklist values like food, beverage and whereas A2 has
picklist values like food, games.
Task: Whenever we select all picklist values of Child objects A1 and A2 ,the parent object A must
populate all value of child records and it should be only unique values of child picklist value, for
example, if I select the all the value of multiselect picklist of both child objects A1 and A2 then A parent
object must populate food, beverage and games only not food twice.
I need this task to be completed only with trigger code, please provide the solution for the problem.
I
Reply
David Liu
JA NU A RY 2 5 , 2 0 1 4 @ 1 1 :4 5 A M
http://www.sfdc99.com/beginner-tutorials/
54/85
6/15/2014
Hey Piyush!
Heres how to tackle the problem:
1. Create a trigger on the child object
2. In the trigger, traverse to the parent object and query all child objects
3. Loop through the child objects and add the picklist values to a Set (to prevent
duplicates)
4. Update the master picklist on the parent object
Best of luck =)
David
Rep l y
piyush
JA NU A RY 2 7 , 2 0 1 4 @ 1 0 :1 1 A M
Dear david,
Can you please make me understand through coding, it will
be really a great help ,I am totally new to triggers.
Thanks
Regards
Piyush
Reply
David Liu
JA NU A RY 2 7 , 2 0 1 4 @ 9 :1 0 PM
Hey Piyush,
My best suggestion is to get this Java book to ramp up quickly:
http://www.sfdc99.com/2013/05/20/the-best-way-to-quickly-learn-howto-code-in-salesforce/
Then go through each chapter here one by one you definitely have
the tools to do this once you get up to Chapter 5!
http://www.sfdc99.com/beginner-tutorials/
When youre ready, post your code and Ill do my best to help debug!
David
Rep l y
http://www.sfdc99.com/beginner-tutorials/
55/85
6/15/2014
sfdc novice
JA NU A RY 1 6 , 2 0 1 4 @ 1 1 :5 1 PM
David Liu
JA NU A RY 1 6 , 2 0 1 4 @ 1 1 :5 2 PM
Anonymous
JA NU A RY 1 5 , 2 0 1 4 @ 6 :0 7 A M
Hi David,
Can you please explain the concept of Batch Apex with a simple example.
Regards,
sfdc novice
Reply
David Liu
JA NU A RY 1 5 , 2 0 1 4 @ 8 :5 8 A M
Batch Apex lets you run and schedule huge coding jobs!
http://www.sfdc99.com/beginner-tutorials/
56/85
6/15/2014
prasanth
JA NU A RY 1 3 , 2 0 1 4 @ 6 :0 5 PM
Nice post and it made me confident on salesforce by reading your all articles
Reply
David Liu
JA NU A RY 1 3 , 2 0 1 4 @ 8 :0 7 PM
Good job Prasanth, hope you continue to have a great Salesforce career!
Rep l y
Sanjay Gupta
JA NU A RY 8 , 2 0 1 4 @ 8 :4 5 PM
Thanks a lot for the material you provided bro.Yesterday,i cleared a interview for the tier 2 developer
support for salesforce,now i will appear for next round by 1 feb in which they will ask me about
force.com platform and visual force pages and coding part.if i will find difficulty while studying that in
next 15 days,i ll surely ask for your help.thanks a ton..God bless you.
Reply
http://www.sfdc99.com/beginner-tutorials/
57/85
6/15/2014
David Liu
JA NU A RY 8 , 2 0 1 4 @ 9 :0 5 PM
sss
JA NU A RY 8 , 2 0 1 4 @ 5 :5 0 PM
Hi David,
I have a merchandise object and line item objectwhen I place an order via a line item record, the
merchandise inventory should get reduced accordingly. Can you help with this.
Thanks
sss
Reply
David Liu
JA NU A RY 8 , 2 0 1 4 @ 8 :5 1 PM
Hey sss =)
Youll need a trigger for this!
First, your trigger needs to detect when an order is placed (hard part):
http://blog.jonathanbroquist.com/using-trigger-old-trigger-new-to-detect-whenfield-values-change/
Then, youll need to do a SOQL query for the particular Merchandise object and
reduce its inventory (easy part):
This tutorial does something similar: http://www.sfdc99.com/beginnertutorials/#soqlTrigger
http://www.sfdc99.com/beginner-tutorials/
58/85
6/15/2014
Sanjay Gupta
JA NU A RY 7 , 2 0 1 4 @ 7 :2 4 PM
Hi David,
Can you recommend me some material for administrator part.i am working on sfdc for last 1 month.i
am developing my app. in my developer org. for a school.i have used custom objects,custom
tabs,custom fields,designed profiles and roles as well.used master-detail and look up as well.its really
interesting,i think atleast for 6 months ,i should focus on admin part bcoz there are lots and lots of
things such as workflow,approval process,junction obect,time based work flow,much more to
undrstand and then i should jump into developer part.
1.So ,can you suggest me some material for admin part.
2.Can you explain me what is Record Type.
Reply
David Liu
JA NU A RY 7 , 2 0 1 4 @ 7 :3 1 PM
This ones by far the best tutorial Ive seen for the admin side of things! It covers
everything youd ever want to know!
http://bit.ly/1bge5A3
Additionally, heres a free course thatll help you get started on the admin side:
https://www.udacity.com/course/ud162
Think of record types as categories. For example, you might have a record type
category for Public accounts and Private accounts. The biggest advantage of
record types is that you can show different fields for each record type. For example,
Public accounts could have a field for Stock Price, while Private accounts
wouldnt show that field.
Hope this helps!
David
Rep l y
http://www.sfdc99.com/beginner-tutorials/
59/85
6/15/2014
Anonymous
JA NU A RY 6 , 2 0 1 4 @ 5 :1 4 A M
Hi David,
Can you please explain the concept of email services with a simple example.
Regards,
sfdc novice
Reply
David Liu
JA NU A RY 6 , 2 0 1 4 @ 5 :3 2 PM
Sanjay Gupta
JA NU A RY 5 , 2 0 1 4 @ 6 :4 5 A M
Hi David,
Can you please explain me the difference with real world example for Workflow and Approval Process.
for e.g student(object) issuing a book from library(object) with date of issue and date of return fields. if
student returns a book after 2 days ,he should be imposed a fine of $1 every day till he returns.So,will
the workflow work for it or approval.
can you give me some real world example.
Reply
http://www.sfdc99.com/beginner-tutorials/
60/85
6/15/2014
David Liu
JA NU A RY 5 , 2 0 1 4 @ 1 1 :0 5 A M
Piyush Gupta
JA NU A RY 4 , 2 0 1 4 @ 6 :4 0 A M
Hii David ,
I created four custom objects ,A which is a a parent of B and B which is a parent of C and C is a parent
of D. Each custom objects has amount field with currency data type.The thing is this ,I need to create
this task only withTrigger in such a way so that it will calculate
the amount like Bs custom field i.e A+B will show addition of amount of both A and B . C will also display
addition of amount of B and C same thing with D .Please provide me how to accomplish this task.
Reply
David Liu
JA NU A RY 4 , 2 0 1 4 @ 5 :3 4 PM
Hey Piyush,
Since this is possible without writing code, Id recommend that method first.
Whenever you have master-detail relationships, you can sum the values of your
children using roll-up summaries:
https://help.salesforce.com/HTViewHelpDoc?
id=fields_about_roll_up_summary_fields.htm&language=en_US
http://www.sfdc99.com/beginner-tutorials/
61/85
6/15/2014
So lets say A has three child objects of B, each with amount 10, 20, and 30. You can
create a roll-up summary on A that sums up all the amounts of the children Bs, in
this case, that would be 10 + 20 + 30 = 60. If you need to add As amount (lets say its
50), create a formula that adds the two together 50 + 60 = 110.
Hope this helps =) Let me know how it goes!
David
Rep l y
Sunil
JA NU A RY 4 , 2 0 1 4 @ 2 :3 0 A M
David, could you explain the get;set . If you have already done in the past direct me on page.
public List accounts {get;set;}
Thanks
Reply
David Liu
JA NU A RY 4 , 2 0 1 4 @ 5 :3 0 PM
Youll mostly use {get; set;} when creating Visualforce pages and controllers. Outside
of that they are not really necessary unless youre building a huge app!
Adding {get; set;} after a variable automatically creates two methods for you that
you can use. For example, with a name variable
String name {get; set;}
// These two methods are automatically created in the background
public String getName() {
return name;
}
public void setName(String n) {
name = n;
}
So instead of editing the variable name directly, you use these two methods
instead. Here are many documented reasons why we use these methods:
http://stackoverflow.com/questions/1568091/why-use-getters-and-setters
http://www.sfdc99.com/beginner-tutorials/
62/85
6/15/2014
Anonymous
D E C E M B E R 2 8 , 2 0 1 3 @ 8 :3 7 A M
sfdc novice
D E C E M B E R 2 7 , 2 0 1 3 @ 7 :1 4 A M
Hi David,
Can you plz explain the concept of recursive triggers with a simple example
Regards,
sfdc novice
Reply
David Liu
D E C E M B E R 2 7 , 2 0 1 3 @ 9 :2 7 A M
63/85
6/15/2014
Salesforce will detect that recursion is happening and end it after a while. This is
why Salesforce has governor limits!
David
Rep l y
Anonymous
D E C E M B E R 3 0 , 2 0 1 3 @ 5 :3 4 A M
Raj
D E C E M B E R 2 7 , 2 0 1 3 @ 4 :4 4 A M
Hi David,
I want to make the below query dynamic, In below code I am using hard-coded values (integer
i=1;i<=5;i++)
I know I can use size() method but in this case number depends on fields on Address object.
Currently in Address object there are 5 Fields so I have taken i<=5. I want in future if someone adds few
more fields to that object we should not change the code. Plz help.
public with sharing class abc123dynamic {
public list addr = new list();
public string initialquery=select Name,;
public string middlequery=;
public string finalquery= from Addrress__c;
public string strq=;
public list getReccords() {
for(integer i=1;i<=5;i++)
{
if(i<=4)
{
http://www.sfdc99.com/beginner-tutorials/
64/85
6/15/2014
middlequery += 'Address'+i+'__c'+',';
}
else
{
middlequery += 'Address'+i+'__c';
}
}
strq = strq+initialquery+middlequery+finalquery;
addr=database.query(strq);
return addr;
}
}
Reply
David Liu
D E C E M B E R 2 7 , 2 0 1 3 @ 9 :2 8 A M
Liz K
D E C E M B E R 2 6 , 2 0 1 3 @ 6 :3 1 PM
Eric thanks so much for this! Reading about your experiences makes me realize that other nontechies are not alone in trying to figure this stuff out, and theres hope, too!
Question on guidance When would you recommend that people go through the links on this page (in
order), versus starting off with 1 blog post and clicking the next link at the bottom of the post?
Sometimes those go to additional articles that arent necessarily referenced on this page.
Reply
http://www.sfdc99.com/beginner-tutorials/
65/85
6/15/2014
David Liu
D E C E M B E R 2 6 , 2 0 1 3 @ 8 :1 6 PM
Definitely go in order on this page! If its not linked on this page, its probably not
that important or its covered again elsewhere!
Rep l y
ashish
D E C E M B E R 1 8 , 2 0 1 3 @ 7 :5 2 PM
Hi David, you have done a wonderful job and I appreciate your efforts you put into to explain things in
a very way.Best thing about you you respond to many of the mails and comments..please keep up the
spirit
I would request you to please explain collections in a detail ways , as collections play a very important
role. for example map collection requires lot of visualization to actually implement it.
Would appreciate if you explain collections in very details
Thanks Ashish
Reply
David Liu
D E C E M B E R 1 8 , 2 0 1 3 @ 8 :0 2 PM
http://www.sfdc99.com/beginner-tutorials/
66/85
6/15/2014
sree
D E C E M B E R 1 6 , 2 0 1 3 @ 3 :2 4 A M
Hi,
this is my trigger code..how test this code i m trying but it;s not working they show error
@IsTest
public class TestDisplayerrormsg
{
static testMethod void insertmarkes()
{
Student__c std =new Student__c();
std.Student_Name__c=sree;
std.Name=sre; //roll number master detail ship filed
insert std;
Markes__c Mar = New Markes__c();
Mar.Roll_Number__c= ; //master detail relation ship with student
Mar.Name=jan;
Mar.sub_1__c=19;
Mar.sub_2__c=18;
Mar.sub_3__c=17;
Mar.sub_4__c=19;
Mar.sub_5__c=18;
Mar.sub_6__c=17;
Mar.Esub_1__c=78;
Mar.Esub_2__c=79;
Mar.Esub_3__c=78;
Mar.Esub_4__c=76;
Mar.Esub_5__c=78;
Mar.Esub_6__c=79;
insert mar;
}
}
Reply
David Liu
D E C E M B E R 1 7 , 2 0 1 3 @ 7 :4 0 PM
Hey Sree,
Happy to help! I will also need to see your trigger code to see why it is not working!
David
http://www.sfdc99.com/beginner-tutorials/
67/85
6/15/2014
sudha
D E C E M B E R 1 6 , 2 0 1 3 @ 2 :4 6 A M
Not able to understand the topics like emailservices. Expecting you to have a lesson on that.
Thank you very much
Reply
Mayank Jain
D E C E M B E R 1 1 , 2 0 1 3 @ 1 1 :5 7 PM
Hi David,
I want to add two case fields in my custom VF page where i used Standard Controller= Account.
Is their any way to add case field in VF page using statndard controller as Account.
Below is my code.
Can you help me on this?As i am new in apex code.
Reply
David Liu
D E C E M B E R 1 2 , 2 0 1 3 @ 7 :3 4 PM
Mayank Jain
http://www.sfdc99.com/beginner-tutorials/
68/85
6/15/2014
Thanks a Lot!!!
Reply
Avshek
NOVE M B E R 2 5 , 2 0 1 3 @ 3 :1 6 A M
Hi David,
Great job !!! You are the best !!
I was reading our course and it was amazing. All my SFDC concepts were getting cyrstal clear.
But, I could not access after Chapter 5 Point 2.
Is it yet to be published or may be I am havng some browser issue ?
If its yet to published. Please let me know. I would be eagerly waiting for your update.
Thanks a lot man for helping us out with Apex coding. You are a genius.
Regards,
Avishek
Reply
David Liu
NOVE M B E R 2 5 , 2 0 1 3 @ 6 :3 6 PM
Woot woot!
Ive planned out 10+ chapters but only written to 5.2 as of today!
You can expect at least 1 2 posts a week, especially during the holiday season!
Also, planning to put a fun little challenge that will let readers join the Sfdc99 Hall of
Fame!
Lots of fun stuff coming!
David
http://www.sfdc99.com/beginner-tutorials/
69/85
6/15/2014
O
NOVE M B E R 2 4 , 2 0 1 3 @ 6 :4 9 PM
Hi David,
I want to start off by saying a big THANK YOU. The information provided in this site is clear and easy
to understand. I found your website on LinkedIn from an answer to a question someone asked on how
beginners could learn Apex. I actually have practiced all the workbooks and materials everyone
recommends for beginners but did not get a solid grasp of Apex language until I started going through
the lessons on this site. You nailed it for me with this site. The lessons on this site connected the dots
for me.
I spent over five hours on this site yesterday. I enjoyed the humor in your teaching style and love the
practical examples. I found your words of encouragement and tips very helpful too. I have now
completed all the lessons and I am hungry for more lessons from you. I have already sent your website
info to new folks in SF that I know.
I just thought to leave a comment to encourage your desire to help others and find out what I could do
to show some more appreciation. I honestly feel a Thank You is just not enough for this brilliant work.
Well done.
I appreciate!
Reply
David Liu
NOVE M B E R 2 4 , 2 0 1 3 @ 8 :1 8 PM
http://www.sfdc99.com/beginner-tutorials/
70/85
6/15/2014
Manish
NOVE M B E R 2 0 , 2 0 1 3 @ 6 :5 7 A M
David Liu
NOVE M B E R 2 0 , 2 0 1 3 @ 7 :2 5 A M
Thank you Manish! There will definitely be lessons in VF and the non-trigger portions
of Apex! Id like to take it one step further even and talk about object oriented
theory too!
David
Rep l y
neha
NOVE M B E R 1 9 , 2 0 1 3 @ 1 0 :0 0 PM
looking forward to see next posts Thanks for ur immense help I was searching for all the sitesvery
madly to learn the apex and got struck here with ur amazing site.. Its seriously soo helpful for me
Reply
David Liu
NOVE M B E R 1 9 , 2 0 1 3 @ 1 0 :4 2 PM
http://www.sfdc99.com/beginner-tutorials/
71/85
6/15/2014
semsem1983
NOVE M B E R 1 8 , 2 0 1 3 @ 6 :2 0 A M
Hey David,
Im planning to take DEV 401 next month. could you please share some materials and suggestions?
Thank you!
Reply
David Liu
NOVE M B E R 1 8 , 2 0 1 3 @ 1 0 :1 2 PM
Hey Semsem,
First off, remember that the DEV401 exam has no code in it. Absolutely zero! Its
actually very similar to ADM201 or ADM211.
There are two sites I highly recommend for passing DEV401:
1. Sample Recruiting App: this is good because it covers all the major features of
Salesforce (workflows, validation rules, custom objects)
http://bit.ly/1bge5A3
2. Quizlet: Look for DEV401 flashcards, they are very helpful in letting you know what
you need to study for!
http://quizlet.com/20548250/salesforce-dev-401-exam-study-guide-courtesy-peterbosch-flash-cards/
I passed the exam on my first try mainly using the above two resources, so you can
do it too!
David
Rep l y
Ishan Kashyap
NOVE M B E R 1 7 , 2 0 1 3 @ 8 :2 0 A M
Helllo David,
I am following ur video tutorials..They are superb for learning and ur videos make the coding thing easy
on salesforce..please upload more tutorials.
http://www.sfdc99.com/beginner-tutorials/
72/85
6/15/2014
Thanks
Reply
Saif
NOVE M B E R 1 3 , 2 0 1 3 @ 9 :2 4 PM
Hi David. Can you help me with this ? Ive tried searching a lot for this but so far all my efforts are in
vain.
I need to track Days since last Event on every Account record. I need to prep a report for my orgs top
mgmt. The default Days since last Activity wont help me.
If you have come across any similar article which can help me on this, Please guide me. Thanks.
And Yeah, Im a newbie. Ive just started with Head First Java and loving it.
Reply
David Liu
NOVE M B E R 1 3 , 2 0 1 3 @ 9 :4 2 PM
Hey Saif,
I love code, but you can do this one without it!
If youre familiar with Roll-Up Summary fields, you can simply create one that gets
the MAX date of associated Event records. Youd even be able to add criteria to
your field to only get the MAX of certain Events.
Roll-Up Summaries arent available by default with Accounts and Events (since its
not technically a master-detail relationship) but you can simply install this very
popular app to have the same functionality!
https://appexchange.salesforce.com/listingDetail?listingId=a0N30000009i3UpEAI
Then, simply have a formula field that calculates the number of days between
TODAY() and your roll-up field.
Hope this helps!!
David
Rep l y
http://www.sfdc99.com/beginner-tutorials/
73/85
6/15/2014
Saif
NOVE M B E R 1 4 , 2 0 1 3 @ 1 2 :4 0 A M
Hi David.
Thanks for the prompt reply. However Im unable to get it to work.
I installed the App and followed the step by step procedure. However the field on the
Account object Date of Last Event isnt updating for some reason. I used the
MAX(Completed Date) field of Event with a filter stating: Event Status = Completed..
Im pretty sure I did it properly. :(
Reply
David Liu
NOVE M B E R 1 4 , 2 0 1 3 @ 8 :3 3 PM
Hey Saif,
Try doing it on a brand new set of accounts and events to see what
happens! I suspect that it doesnt work on older records unless you
trigger it in a certain way!
If all else fails, give their support a call!
1.847.574.5742
Finally, if all else fails, lets code!
David
Rep l y
semsem1983
NOVE M B E R 1 2 , 2 0 1 3 @ 1 0 :4 1 A M
Keep up the amazing work David. Chapter 5 and 6 are very important to me. cant wait :)
Reply
http://www.sfdc99.com/beginner-tutorials/
74/85
6/15/2014
David Liu
NOVE M B E R 1 2 , 2 0 1 3 @ 6 :4 6 PM
Srikanth
NOVE M B E R 1 0 , 2 0 1 3 @ 1 0 :5 4 PM
Hi David,
U r Just Amazing..plz Keep Posting..
T
Reply
David Bruce
OC T OB E R 2 9 , 2 0 1 3 @ 1 0 :4 0 PM
Hi David,
Thanks for making this site and being so helpful in the support forum. I found your link there and came
here and just want to express my thanks. Ive been looking for a way to look down so I can write a
trigger to update the children of a self-join when certain parents fields are updated. Most other code I
found was way over my head. Your clear presentation made it easy to understand what I need to do.
Also, your humor is greatly appreciated, too. That strawberry smoothy was delicious!
Gratefully,
-another David
Reply
http://www.sfdc99.com/beginner-tutorials/
75/85
6/15/2014
David Liu
OC T OB E R 2 9 , 2 0 1 3 @ 1 0 :5 9 PM
Santhosh
OC T OB E R 1 6 , 2 0 1 3 @ 8 :4 0 A M
David Liu
OC T OB E R 1 6 , 2 0 1 3 @ 1 0 :3 2 PM
Hey Santhosh,
Thanks for the inspiration! Im going to have a future chapter on data models and
the different relationships between objects. For now though I recommend looking at
Salesforce standard documentation for this kind of stuff.
David
Rep l y
Santhosh
OC T OB E R 1 5 , 2 0 1 3 @ 4 :4 1 A M
http://www.sfdc99.com/beginner-tutorials/
76/85
6/15/2014
Hi David,
Its a great work. I want to know the salesforce standard functionality.
If possible can you please post the content on it.
Thanks,
Santhosh
Reply
David Liu
OC T OB E R 1 6 , 2 0 1 3 @ 1 :0 7 A M
Hey Santhosh,
Is there any particular aspect of Salesforce standard functionality youre looking to
learn? Happy to educate!
David
Rep l y
Chris
OC T OB E R 1 3 , 2 0 1 3 @ 9 :1 4 A M
Really loving this series and was delighted to see TWO in my mailbox!
Eagerly looking forward to more :)
Reply
David Liu
OC T OB E R 1 3 , 2 0 1 3 @ 1 2 :2 4 PM
http://www.sfdc99.com/beginner-tutorials/
77/85
6/15/2014
ashish
OC T OB E R 7 , 2 0 1 3 @ 1 1 :5 3 PM
David Liu
OC T OB E R 8 , 2 0 1 3 @ 1 :1 9 A M
Ales
OC T OB E R 7 , 2 0 1 3 @ 1 :2 2 A M
David,
I posted some code to copy the task objects activitydate on the success forum and you responded
overnight, and I followed you to here. You are God-sent and may all the good that you are doing here
on your site come back to you a million times that is my blessing to you!
I clicked on your link to get the Java book you suggested. I hope you are being paid by Amazon for it.
I cant wait for your next post looking forward to it! Please keep doing what you are doing youre
amazing!!!
Reply
David Liu
OC T OB E R 8 , 2 0 1 3 @ 1 :2 0 A M
http://www.sfdc99.com/beginner-tutorials/
78/85
6/15/2014
Jeet
OC T OB E R 3 , 2 0 1 3 @ 2 :2 7 A M
Hi David,
Hope you are doing well!! congratulations for this amazing and very helpful website.. i am new to this
platform, i found your website, and i started studying but unfortunately after Chapter 3-3rd point
onwards the hyperlink just disabled and i am not able to view further chapters, unable to proceed with
the course..
Could you please check the pages and do the needful..
Thanks once again, waiting for your kind reply
Thanks,
Jeet
Reply
David Liu
OC T OB E R 3 , 2 0 1 3 @ 6 :5 5 PM
Hey Jeet,
Ive planned out many chapters but Im still working on the posts! You can generally
expect 1 post per week nowadays =)
You can find me often nowadays on the Salesforce Success community helping users
out with their business problems!
Let me know if theres anything in particular youd like to learn!
David
http://www.sfdc99.com/beginner-tutorials/
79/85
6/15/2014
Jeet
OC T OB E R 4 , 2 0 1 3 @ 2 :1 5 A M
Hi David,
Thanks a lot for your reply i am new to this platform and i dont have coding
background.. and would like to learn Apex, the way u explained Triggers and SOQL
was very nice.. can u please suggest me how to go about it??
waiting for your kind reply
Thanks,
Jeet
Reply
David Liu
OC T OB E R 4 , 2 0 1 3 @ 9 :5 9 PM
Hey Jeet,
Highly highly recommend learning the fundamentals of Java from this
book:
http://www.sfdc99.com/2013/05/20/the-best-way-to-quickly-learn-howto-code-in-salesforce/
You dont even need to get more than halfway through it!
Ill be posting once a week stay tuned!
David
Rep l y
Jeet
OC T OB E R 1 4 , 2 0 1 3 @ 2 :3 0 A M
http://www.sfdc99.com/beginner-tutorials/
80/85
6/15/2014
Hi David,
Thanks once again for your reply and thank you so much for posting the
3rd chapter.. i was waiting to learn from your website.. also as you
suggested will go through that link to learn Java Concepts.. Thanks once
again.. keep up the good work..
God Bless!!!
Thanks,
Jeet
David Liu
OC T OB E R 1 4 , 2 0 1 3 @ 6 :4 0 PM
Chris
OC T OB E R 1 , 2 0 1 3 @ 3 :3 8 PM
LOVE IT! Really looking forward to reading more. I will keep checking in.
Reply
anand
S E PT E M B E R 1 6 , 2 0 1 3 @ 2 :4 1 PM
Hi David Liu,
i am anand myself, i greatly appreciate your work here. your website is awesome for salesforce.
i would like to know some details, please guide me.
1. i am having JAVA/j2EE background, now i am interested in Salesforce, so is the programming in
salesforce same like java..?
2. how long will it take to learn salesforce from scratch..? is apex and visual force are tough to code
and learn..?
i am thankful for your valuable response. cheers David.
http://www.sfdc99.com/beginner-tutorials/
81/85
6/15/2014
David Liu
S E PT E M B E R 1 6 , 2 0 1 3 @ 8 :2 7 PM
Hey Anand,
The programming in Salesforce is very similar to Java! You have a huge head start
here.
The biggest is that Salesforce has governor limits, which you will have to work
around. For example, you can only query 50000 records in a single execution in
Apex. More info here:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_gov_limits.htm
Apex and Visualforce will be a piece of cake for you to learn! Youll be pleasantly
surprised how easy they are to use compared to a Java EE background =)
The hardest part (if you havent already learned this) is to get used to the non-code
aspects of Salesforce. For example, permissions, sharing rules, when to use record
types, object relationships, etc. You absolutely cannot be a good Salesforce
developer unless you have a very strong grasp of what you can do without code
first.
Hope this helps, and Im glad you enjoy my site!
David
Rep l y
Saif
A U G U S T 3 0 , 2 0 1 3 @ 5 :1 0 A M
Hi David. I want to thank you for sharing this info which is very easy to pick up for a beginner like me. I
have just started my career on this platform as a business analyst after my MBA and am planning to
get certified as an admin in near future.I find your website very useful. I will be waiting for more articles
like these. Thank You.
Reply
http://www.sfdc99.com/beginner-tutorials/
82/85
6/15/2014
Jeny
A U G U S T 2 8 , 2 0 1 3 @ 1 1 :5 2 PM
catherine
JU LY 1 7 , 2 0 1 3 @ 1 0 :3 3 PM
Hi, Im a beginner in apex coding. will you help me create a test class for this. I do not have DML. my
class do is just searching existing accounts.
Heres my apex controller:
public with sharing class autoAccountSearchController {
public String strDebug1 {get;set;}
public List accounts {get;set;}
public autoAccountSearchController()
{
accounts = new List();
Account a = [select Id, Name, OwnerId, Site from Account limit 1];
}
public PageReference populateAccounts()
{
accounts = [select Id, Name, OwnerId, Site from Account where Name like :(strDebug1 + '%')];
return null;
}
}
thank you.
cat
Reply
David Liu
http://www.sfdc99.com/beginner-tutorials/
83/85
6/15/2014
Hey Catherine,
Im so happy youre learning Apex that I started writing this as soon as I got home!
This test class will cover your code 100%. Make sure to read the comments theyll
help you understand what is going on.
@isTest
public class TestAutoAccountSearchController {
public static testMethod void testAutoAccountSearchController () {
// This creates an account for testing
Account a = new Account();
a.Name = Catherine;
insert a;
// This creates your controller
AutoAccountSearchController controller = new AutoAccountSearchController();
// This sets the search parameter to the account we just created
controller.strDebug1 = a.Name;
// This does the controllers search
controller.populateAccounts();
// This just makes sure everything worked
System.assertEquals(controller.accounts.size(), 1);
}
}
Rep l y
Leave a Reply
Enter your comment here...
http://www.sfdc99.com/beginner-tutorials/
84/85
6/15/2014
T HE M E : S I M PLE S T Y LE BY FI M PLY
http://www.sfdc99.com/beginner-tutorials/
85/85