Salesforce coding lessons for the 99%
Finally, Apex tutorials for point-and-click admins! Written by a self-taught Google engineer.
  • Beginner Tutorials
    • Apex
    • Certifications
    • Career Info
    • Technical Architect
    • Visualforce
    • Videos
  • Apex Academy
  • Success Stories
  • About Me
  • Misc
    • Mailbag
    • Challenges
    • Links
    • Login to my Org
Follow @dvdkliuor SUBSCRIBE!

Quiz Answers – Chapter 1

January 27, 2014

Preface: this post is part of the Write Your First Trigger From Start to Finish series.
View Chapter 1 quiz questions without the answers!

Chapter 1 Questions:

1. If you can solve a business need using either a workflow or a trigger, which should you use?

Always use a point-and-click solution (workflow) when possible!

  • It’s easier for your team to create and maintain workflows
  • Workflows are easier to find when debugging unexpected behavior in your org
  • Workflows never break!
  • You don’t have to write test classes

2. Is it possible to write a trigger directly in a production Salesforce org?

Not possible! All code must be written in a sandbox (any type) and deployed to production

3. What is Trigger.new and why is it so important?

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!

4. Which version of the field name do you reference in triggers? Field Label or Field/API Name?
– Field Label: Favorite Color
– Field / API Name: Favorite_Color__c

Always use the Field/API name! Salesforce is more strict if an admin tries to change this name and it never has spaces, which makes it easier to read in code!

5. Is it possible to deploy code to production without writing a test class?

No – always write a test class! OK, technically, it is possible to deploy without a test class – but that method is actually more difficult and is never recommended.

6. How does your test class know which trigger to test?

Trick question – it doesn’t! Test classes must indirectly “trigger” triggers by doing actions that cause a trigger to fire – they never explicitly tell a trigger to run.

7. True or false. Developers should avoid using comments as much as possible in code since comments are ignored by Salesforce.

False! The more comments, the better! They’ll help you and other members of your team quickly understand what your code is doing.

8. At minimum, how many components must be added to a Change Set to deploy an Apex trigger?

Two – your trigger and your test class!

Chapter 1 Practice Trigger:
Write a trigger that transfers every new contact to an Account named “Sfdc99”!
Don’t forget the test class!

Your answers should look something like this:

trigger TransferContact on Contact (before insert) {
  for (Contact contactInLoop : Trigger.new) {
    // This ID will be different in your org!
    contactInLoop.AccountId = '001i000000azqHs';
  }
}
@isTest 
public class TestTransferContact {
  static testMethod void insertNewContact() {
    Contact joe = new Contact();
    joe.FirstName = 'Joe';
    joe.LastName  = 'Montana';
    insert joe;
  }
}

Too easy? Too hard? Post a comment and let me know!

100 Comments
Mounika S
June 7, 2021 @ 8:34 am

Hi Pavan,

In the test class you need to create new Account as well along with new contact, Since we are querying the account using name condition. I also had similar kind of issues, code is working now , Hope this helps for you also :-)

Reply
Jeetu
June 2, 2021 @ 8:46 am

Thanks for sharing…

Reply
Deepika
January 15, 2020 @ 10:21 pm

From where we need to take this id ?
cont.AccountId = ‘001370000033eit’;
????

Reply
    Arushi
    May 7, 2020 @ 10:18 am

    Hi Deepika,
    Create and account with SFDC99, Then go to the account URL. In the URL between Account and view, you can get the ID.

    Reply
sravani
July 9, 2019 @ 10:09 am

Hi David,

Thanks for doing this!!!

My doubt is I have also used the contact.AccountId for the trigger that is mentioned above but my concern is where can i see this AccountId API Name.

Yes!! I know it’s an API Name. But for which one??
Account Name in Contact object or Account object.
If it is in contact object the API Name for Account Name is ‘Account’ right?

Please help me solve this. I’m bit confused :(

Reply
    Lavanya
    November 26, 2021 @ 7:11 am

    Account Name in Contact. Since it is a lookup field we are mentioning this as ‘AccountID’.

    Reply
irshad md
July 9, 2019 @ 2:07 am

Thanks for sharing…

Reply
Pavan
May 17, 2018 @ 8:58 am

Iam facing the below error after apex test execution. Please help me fix this

System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, Transfer_Contact_to_Acc: execution of BeforeInsert

caused by: System.QueryException: List has no rows for assignment to SObject

Trigger.Transfer_Contact_to_Acc: line 5, column 1: []

Reply
    Pavan Kumar
    May 18, 2018 @ 5:11 am

    Please reply

    Reply
      Mounika S
      June 7, 2021 @ 8:33 am

      Hi Pavan,

      In the test class you need to create new Account as well along with new contact, Since we are querying the account using name condition. I also had similar kind of issues, code is working now , Hope this helps for you also :-)

      Reply
    Amruta
    July 1, 2018 @ 3:39 am

    This is working fine.
    Make sure all required fields are inserted and verify may be another trigger is restricting. Share the code if possible.

    Reply
Atul Thakur
July 14, 2017 @ 12:13 pm

Hi David,
How do you figure out the API name for standard fields. e.g. How did you figure out the “accounted” field and put a condition on it.

Thanks

Reply
    Zad
    March 15, 2018 @ 10:46 am

    go to the standard object which contains the standard field that you are looking for (i.e. Setup –> Customize –> Opportunities –> Fields) then look for the exact standard field you wish to use in your code ( i.e. Stage) and Filed Name of Stage which is StageName is the API name.

    Reply
Monisha
July 13, 2017 @ 6:32 am

Hello David,
Greetings!
Is it possible to view the created record(created in apex class) in contact object ?

Reply
Anonymous
August 14, 2016 @ 4:49 pm

trigger transferContact on Contact (before insert) {

Account a = new Account();
a.Description = ‘test’;
a.Name = ‘test’;
insert a;
for(Contact c : Trigger.New) {
c.Account = a;
}

}

What is wrong with this trigger ?

Reply
    Priyank Singh
    November 23, 2016 @ 3:14 am

    Account a = new Account();
    Here you need to mention contact in place of account, as your trigger is for contact

    Reply
    Kavitha J S
    December 7, 2016 @ 4:52 am

    in the for loop parse account id instead of name.
    C.AccountId = a.Id;

    Reply
Max Che
July 31, 2016 @ 5:31 pm

Hi, David. Yes it is easy to follow your steps, but difficult to remember.
give me advice what easy way to remember when i need to used the record?

Reply
Debbie
June 24, 2016 @ 6:58 pm

David,

Thanks for sharing your knowledge and your love of coding with the world :)

I was able to complete the quiz, but I’m still find my self just copying your syntax although I understand what the code should accomplish.

Just to let you know I’m mid-way through chapter 3 of Head First Java.

Reply
    David Liu
    June 27, 2016 @ 4:44 pm

    Head First Java will help with syntax =)

    I talk about it a lot in the Apex Academy, but, you can learn without paying for the academy =) Only if you are lazier!

    Reply
Ángel
June 3, 2016 @ 12:35 am

Hi David,

I’m just starting to code in salesforce for my org, and this site is helping me a lot. Thanks so much!

In this exercise I don’t understand this line of code (the most important one, omg!):
contactInLoop.AccountId = ‘001i000000azqHs’;

Could you help me understand it please?

Thnx!!!!

Reply
    David Liu
    June 4, 2016 @ 9:44 am

    This line sets the AccountId of the contact to 001i000000azqHs =)

    Reply
Bill Powell (@powellw99)
May 28, 2016 @ 4:16 am

Not heard to comprehend, but I always struggle with wording and definitions. Kind of like I know how to speak english but don’t know the words. I’m a first time coder so i’m sure it will take me a while :-)

Reply
Lakshmanan Murugesan
July 10, 2015 @ 7:36 pm

Hi David,

This is my trigger code

trigger transfercont on Contact (after insert) {
for (Contact cont : Trigger.new) {
cont.AccountId = ‘001370000033eit’;
update cont;
}

}

and my test class code is

@isTest
public class TestCont {
static TestMethod void Transfercont() {
Contact con1 = new Contact();
con1.LastName = ‘Vadambachery Murugesan’;
insert con1;
}
}

If i click on ‘Run Test’, my test class runs fine, but i don’t see a contact created with the last name that i specified in the test class.

So i tried to create a contact in contacts page manually, it threw me the below error

Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger transfercont caused an unexpected exception, contact your administrator: transfercont: execution of AfterInsert caused by: System.FinalException: Record is read-only: Trigger.transfercont: line 3, column 1

Please let me know what went wrong here. I recently signed up for a developer account and i’m the admin for the account.

Thanks,
Lakshman

Reply
    Hardik
    July 24, 2015 @ 3:16 am

    Hi Lakshman,

    Record insertion/updation using test class is temporary,they are rollbacked once the test class execution is finished.
    Secondly, You’re firing the trigger after the record is inserted(event is after insert) and that is reason the AccountId field is read-only.
    Change your trigger event to before insert.

    Reply
    Deepika
    January 15, 2020 @ 10:19 pm

    From where we need to take this id ?
    cont.AccountId = ‘001370000033eit’;
    ????

    Reply
      Austin
      February 4, 2020 @ 8:25 am

      You’ll need to get it from an existing account. Either create a new account or refrences an existing account id from your org.

      Reply
Mustafa Faqiri
May 20, 2015 @ 5:36 pm

hi David when i try to make a TRIGGER i get an Error can you maybe help.
Thank you

trigger TransferContact on Contact (before insert) {
for (Contact contactInLoop : Trigger.new) {
// This ID will be different in your org!
contactInLoop.AccountId = ’00e24000000vTmo’;
}
}

ERROR:
Error Error: Compile Error: Incorrect SObject type: Contact should be Account at line 1 column 1

and when i change it to Account then this happens:

trigger TransferContact on Account (before insert) {
for (Account contactInLoop : Trigger.new) {
// This ID will be different in your org!
contactInLoop.AccountId = ’00e24000000vTmo’;
}
}

ERROR:
Error Error: Compile Error: Invalid field AccountId for SObject Account at line 4 column 5

ONE LAST QUESTION: do you recommend me to work with Sandbox because i am working on salesforce.com- Developer Edition.

thank you

Reply
    Austin Mehall
    February 4, 2020 @ 8:28 am

    Looks like you setup your trigger on the account sObject which is why your receiving error message 1 & 2 accountId would be just id on the account object the trigger you’re trying to write is meant to be on the contact sObject.

    Developer-Edition should be fine. I just completed the quiz in that org with no issue.

    Reply
Mary
February 9, 2015 @ 10:48 am

How i do code coverage, I am using developer console when doing the test.
Also I want to test code above(transfer contact)and I can see the Account is hardcoded. So I want to test it with new Account that I created but it is not automatically creating an Account.
May be another question how will I test the Transfer Contact Trigger?

Reply
    David Liu
    February 9, 2015 @ 6:54 pm

    You will find answers to your questions as you keep reading through the chapters =)

    Reply
Mayank Srivastava
January 30, 2015 @ 12:27 pm

I started today David and this comment marks the end my first trigger and test class (Chapter 1 + Quiz) =)
I found it to be pretty easy but I guess I shouldn’t get all ecstatic so soon. My gut feeling tells me that the tough is yet to come :P

Reply
Jagdish Ram
January 21, 2015 @ 10:33 pm

I am new to salesforce and today only started your tutorial. I do have a salesforce developer edition account but cant find Sandbox. Is Sandbox not available for DE account…???If not, how can I deploy the test class I created in chapter 1.??

Reply
    David Liu
    January 21, 2015 @ 10:59 pm

    You’ll need a paid org with a sandbox if you want to deploy!

    Reply
      Geoff
      January 22, 2015 @ 3:22 am

      Hi Jagdish (and David),
      I’m almost positive that you can try this by signing up for a 30-day training org for the Advanced Admin course. Org is still free but only lasts 30 days, but it has a sandbox you can use.
      https://www.salesforce.com/form/signup/freetrial_training.jsp#submit
      You want the Administration Essentials for Experienced Admin course.
      At least this way you get to see it deploy

      Reply
        David Liu
        January 22, 2015 @ 9:04 am

        Great tip Geoff!!!

        Reply
Faraz Mohammad Khan
December 16, 2014 @ 10:17 pm

Hi David,

I just love the way you have laid out these tutorials and quizzes. Being an admin, I know how formidable it feels to approach Salesforce’s dev side.But you have made it very less so. Thanks a lot buddy.
Below is my attempt at the practice trigger

Trigger

trigger TransferContact on Contact (before insert) {
Account accountObj = [Select Id from Account where Name = ‘Contact Holder’ limit 1];
Contact[] contacts = Trigger.new;
for(Contact c: contacts){
c.AccountID = accountObj.Id;
}
}

Test class

@isTest
public class TestTransferContact {
static testMethod void createContact(){
Account a = new Account();
a.Name = ‘Contact Holder’;
insert a;
Account insertedAccount = [Select Id from Account where Name = ‘Contact Holder’];
Contact c = new Contact();
c.LastName = ‘Doe’;
insert c;
Contact insertedContact = [Select Id, AccountId from Contact where id =:c.id];
System.assertEquals(insertedAccount.id, insertedContact.AccountId, ‘Success’);
}
}

Hoping you like it :)

Reply
    David Liu
    December 16, 2014 @ 11:04 pm

    This is an excellent trigger/test class =)

    There’s nothing significant that I’d change about it – be very proud of yourself!!!!

    The most important part of what you’ve written is that I can tell you fundamentally understand why you’re doing certain things. That’s the most important part of learning!

    Reply
    Anonymous
    February 6, 2015 @ 9:47 am

    is this right to write
    System.assertEquals(a.id,c.id, ‘Success’);

    Reply
      David Liu
      February 7, 2015 @ 11:09 pm

      Only two arguments in System.assertEquals!

      Reply
    radha
    February 9, 2015 @ 5:21 pm

    instead of writing “Account insertedAccount = [Select Id from Account where Name = ‘Contact Holder’]; why cant we use just a.id
    and also why cant we use c.accountId instead of “Contact insertedContact = [Select Id, AccountId from Contact where id =:c.id];”
    for the sake of System.assertEquals().
    sorry if iam not clear

    Reply
Jim
October 29, 2014 @ 8:15 pm

Hi David,

I see people using “SELECT Id from Account WHERE Name ” verbiage. Where can I find explanation and learn how to implement this text. I know its SQL, but it there a place to learn and understand this through Salesforce?..Still learning.

BTW, passed my developer exam in September.

Reply
    David Liu
    October 29, 2014 @ 8:59 pm

    Chapter 2 right here buddy!
    https://www.sfdc99.com/beginner-tutorials/

    CONGRATS on DEV 401! Did you study with the guides here?

    David

    Reply
      Jim
      October 30, 2014 @ 8:49 am

      Yes, but bounced around a bit on the internet using different study guides.. Fundamentals workbook is a must. I went through it 3 times. Will try to battle ADM 201 next, but concentrating on coding.. Also trying to get a non-profit Salesforce job, but experience is deterring my success, but will keep trying. On to Chapter 2… Thanks for all your help.

      Reply
Geoff
October 20, 2014 @ 7:00 pm

I was trying to combine this with system.assertEquals and got stuck. I switched to System.debug to try and figure it out, but I’m hoping for some clarification on the relationship between the test class and what the trigger is doing. I wanted the test class to verify that the trigger was working as expected, but it seems that I have to set the AccountId on the Contact record in the test class as well. I don’t quite understand why

Trigger:
trigger TransferContacts on Contact (before insert) {
for (Contact c : trigger.new){
//Get the Account Sfdc99’s Id
Account a = [SELECT Id from Account WHERE Name = ‘Sfdc99’ LIMIT 1];
c.AccountId = a.Id;
}
}

Test Class:
@isTest
public class TestTransferContacts {
static testMethod void TestTransfers(){
//Create records from scratch
Account a = new Account();
a.Name = ‘Sfdc99’;
insert a;

Contact c = new Contact();
c.Lastname = ‘Kelso’;
//c.AccountId = a.Id; //Why do I have to declare this? Shouldn’t the trigger do it?
insert c;
System.debug(c.AccountId); //Shows as null when I comment out declaring c.AccountId=a.Id
}
}

Reply
    Geoff
    October 21, 2014 @ 5:24 am

    ok, I got system.assertEquals to work by requerying the Contact. Can you just explain why I need to requery updated results?
    System.assertEquals(‘Sfdc99’, [SELECT Account.Name FROM Contact WHERE Id = :c.Id].Account.Name);

    Reply
      David Liu
      October 21, 2014 @ 5:32 am

      Your variables won’t automatically update to their latest values if you don’t re query. The only exception is ID I believe. =)

      Reply
        Geoff
        October 21, 2014 @ 5:38 am

        Thanks! Is calling the new values right in the assert considered the right way to do it or is there a better way to say something to the effect of “update variable values” prior to system.assertequals?

        Reply
          David Liu
          October 21, 2014 @ 6:06 am

          The more common way is to do the query first, save the results in a variable, then use that variable in your assert. Having it all on one line certainly works but it’s just a little less readable =)

          Reply
Mansoor Ahmed
October 8, 2014 @ 9:26 am

For beginners your site is superb…

Reply
Yashashwini Vijaybhaskar
September 22, 2014 @ 3:21 am

Hi David,

I discovered your site a little late. I have gone through your webinars and your quizlets. It’s a great site, thanks for building such a nice site.

Reply
    David Liu
    September 25, 2014 @ 7:26 pm

    Thank you!

    Reply
shekar
September 14, 2014 @ 8:16 pm

david your codes are so intresting and easy to understand

Reply
Chad
August 28, 2014 @ 12:58 pm

David,

I’m going over the tutorials again. question, is it safe to say to have an order of procedures you follow when creating a trigger. for example, you make sure you know all the required fields in a record, their API names, etc. do you have a layout of everything you look at before you start coding?

Reply
    David Liu
    September 1, 2014 @ 10:58 pm

    Yes that is fair!

    But usually I find out the hard way when testing instead =) Either way you’re going to find out!

    Reply
SD
August 12, 2014 @ 3:27 pm

Hi David, I wrote the trigger on contacts in a different way, but thats not giving me a 75% coverage… In such situation how shall i write my test class.

My trigger:
trigger AssocConToAccount on Contact (before insert) {

list con = new list();

account accId = [select id from account limit 1];

id i = accId.id;

for(contact c : Trigger.new)
{
c.AccountId = i;
con.add(c);
}
insert con;

Test class is same as yours….but its not giving me full coverage.. What do you think,where I need to check.

Reply
    David Liu
    August 12, 2014 @ 8:00 pm

    Create a test class does does all the following:

    1. Creates an Account
    2. Creates a Contact

    If you don’t do step 1 you’ll get an error when you do the SOQL query on Accounts!

    Reply
Dharmendra Pratap Singh Rajawat
August 11, 2014 @ 10:54 am

Hi David,

Thanks for your help. Just want to ask difference b/w before and After? What if we use after insert?

Reply
    David Liu
    August 11, 2014 @ 8:28 pm

    Check out this post!
    https://www.sfdc99.com/2014/01/25/use-vs-triggers/

    Reply
Ronnie Thomas Jr.
August 9, 2014 @ 5:18 pm

I have tried multiple ways to learn to code Apex. I have learned some things but not really a great understanding of Apex. Just going through Chapter 1 has made things I’ve been trying to understand for the past year so easy and clear. The thing that has stood out the most is the Test Class and how to write a Test Class. I feel so confident right now about writing simple Triggers and Test Classes. You have made things so easy, fun, and clear for me to understand.

Reply
    David Liu
    August 10, 2014 @ 4:04 pm

    Awww, thank you Ronnie!

    Reply
mittuvikas
July 19, 2014 @ 3:28 pm

its Awesome!!!!
Fun to learn, neat, clear & simple.
loving to code now :)

Thanks David

Reply
    David Liu
    July 19, 2014 @ 11:24 pm

    Glad you’re having a good time – that’s the most important part!!

    Reply
saurabh
July 18, 2014 @ 10:18 pm

Hello David! you are doing a great job for beginners like me. i am facing an error while saving that code “Error: Compile Error: Incorrect SObject type: Contact should be User at line 1 column 1”.i”ll be grateful to you if you can tell me where am i doing mistake.Thanks

Reply
    David Liu
    July 19, 2014 @ 11:25 pm

    Post your code and I’ll take a look!

    Reply
      Hari Reddy
      August 5, 2014 @ 6:05 am

      trigger TransferContact on Contact (before insert) {
      for (Contact contactInLoop : Trigger.new) {
      // This ID will be different in your org!
      contactInLoop.AccountId = ‘001900000102Ihq’;
      }
      }

      Reply
        Hari Reddy
        August 5, 2014 @ 6:07 am

        i am facing an error while saving that code “Error: Compile Error: Incorrect SObject type: Contact should be User at line 1 column 1″.i”ll be grateful to you if you can tell me where am i doing mistake.Thanks

        Reply
        David Liu
        August 5, 2014 @ 11:04 pm

        Make sure to do it from the Contact tab!

        Reply
Harshad Bharsakle
June 30, 2014 @ 3:28 am

Really helpful thank you David :0

Reply
Tan
June 25, 2014 @ 2:17 am

David,
You have created an Account called SFDC99 and you are using the RecordID of the account SFDC99 right?

Reply
    David Liu
    June 25, 2014 @ 11:53 am

    Correct!

    Reply
Mohammad Hasrat
May 28, 2014 @ 9:44 am

Its a great tutorial for beginners !!

Reply
Sumit Rana
May 25, 2014 @ 7:21 am

Hi David,

Please can you tell me how the last line of your trigger
“contactInLoop.AccountId = ‘001i000000azqHs’;” worked. Means how did it tranfers the contacts to this Account

Thanks

Reply
    David Liu
    May 25, 2014 @ 8:49 am

    AccountId is a standard field (lookup) on every Contact that points to the Account it lives under =)

    Lookup fields are always set by IDs of the records, so in this case we are setting it to the ID of a specific Account!

    Reply
Scott Grant
May 19, 2014 @ 5:00 pm

Thanks David, This is really fun! :)

Reply
    David Liu
    May 19, 2014 @ 7:03 pm

    Sweet!!!

    Reply
dellastreet58
May 15, 2014 @ 2:39 pm

Hi, David. Why did you make your test class public? Could it have been private? Thanks!

Reply
    David Liu
    May 15, 2014 @ 2:51 pm

    It definitely could have been private!
    http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_testing_unit_tests.htm

    You can choose either with very few ramifications =) I chose public because it raises less questions LOL

    Reply
mini
May 10, 2014 @ 3:47 am

How to debug this Trigger?

Reply
    David Liu
    May 10, 2014 @ 11:24 pm

    Check out this post Mini!
    https://www.sfdc99.com/2014/02/22/debug-your-code-with-system-debug/

    Reply
Raj
May 7, 2014 @ 5:56 am

David I want more examples about how to write triggers

Reply
Simeon Tzanev
April 21, 2014 @ 9:17 am

Hi David,

a couple of months ago I stumbled upon your name and your skills while reading an article about the Salesforce Hackaton and your participation there. I was really amazed that you have reached all your expert skills by teeching you this only by yourself !!! My deepest respect and appreciation to you !

I think lots of people are afraid of starting coding because they fear the vast amount of knowledge needed to be a good Salesforce Developer. Thank you SO MUCH giving us confidence that everyone can learn to code !!! This is what every beginner needs the most !

I just finished the Chapter 1 excerces and the Quizes section – all the explanations and code samples you provided here were prepared really great from the didactic point of view and were really easy to understand ! Thank you so much for doing this !

Before continuing to Chapter 2 I’d love to practice even more the creation of Triggers and strenghten my newly achieved skills. Can you provide us with some more of these excellent easy-to-use Trigger exercises ? Thx !

Greetings
Simeon

Reply
    David Liu
    April 21, 2014 @ 8:22 pm

    Here’s one for you Simeon: write a trigger that creates a new Opportunity whenever an Account is created!

    Honored to have a fan! =)
    David

    Reply
      Kim
      April 29, 2014 @ 10:00 am

      This website makes learning Apex so much easier than any of the books that I have been trying to read! This trigger that you recommended Simeon create as another quiz, would it be possible to get the solution posted? I appreciate your help!

      Reply
        Kim
        April 29, 2014 @ 10:31 am

        Oops. I put my email in the name space and name in the email space. Would it be possible to either delete or fix my previous comment?

        Reply
          David Liu
          April 29, 2014 @ 8:27 pm

          Done! I owe you a quiz answer too!

          Reply
      kaveri
      July 9, 2014 @ 2:00 pm

      Hi David … Wat is the ans for the above trigger

      Reply
Deryck Jones
April 20, 2014 @ 6:28 am

David, thank you so much for doing this. I have been struggling for weeks and, for whatever reason, none of it made sense until now. Your explanations are very detailed and thorough and make the process of learning this platform so much easier.

Reply
Jason
April 11, 2014 @ 8:22 pm

Hi David, thank you for your willingness to help others,

Are there any plans to explain and teach on the standard syntax stuff? For example:

Public class
Static
Void
Etc

Reply
    David Liu
    April 11, 2014 @ 10:55 pm

    Yup! We’ll actually cover some of that stuff in the next chapter!

    There’s a book that teaches this 100000X better than I can – this book changed my life and I highly recommend it!
    https://www.sfdc99.com/2013/05/20/the-best-way-to-quickly-learn-how-to-code-in-salesforce/

    Worth the $25 or so dollars, promise!
    David

    Reply
Simi
April 11, 2014 @ 4:12 am

Easy start is motivating..innit!

Reply
    David Liu
    April 11, 2014 @ 10:50 pm

    You can do it Simi!!!!

    Reply
Anu
January 30, 2014 @ 10:13 am

Great effort!
Very useful for beginners.
Waiting to see more from you!

Reply
    David Liu
    January 30, 2014 @ 7:48 pm

    Thank you Anu =)

    Reply
Ravi
January 28, 2014 @ 11:55 pm

Nice one !
Can use Account acc =[Select id from Account where Name=’Sfdc99′ limit 1];
Id accId = acc.id;
and assign it as contactInLoop.AccountId =accId;

We need more quizzes and level upgraded.

Thanks

Reply
    David Liu
    January 29, 2014 @ 12:01 am

    You sure can! That way is much better than mine actually, hahaha!

    (Btw did you mean I should make these quizzes more difficult? Happy to do so!)

    Reply
      Ravi
      January 29, 2014 @ 3:45 am

      Love to see if quizzes are divided into level by.
      Privileged to see your reply.

      Thank you very much.

      Reply
        David Liu
        January 29, 2014 @ 8:27 pm

        I’ll do a quiz for each chapter – so they’ll get progressively more difficult!

        Reply
          Nag
          May 7, 2014 @ 6:00 am

          Mr David I want more examples about triggers

          Reply
            David Liu
            May 7, 2014 @ 9:56 pm

            Write a trigger that creates a Case for every new Account!

            Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *


*

*

Theme: Simple Style by Fimply