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!

The SFDC99 live event is ON this weekend!

August 3, 2015

It’s really happening!

Can’t wait to code live with you this Saturday at 8AM Pacific Standard Time!

I’m still noodling around with different potential coding prompts, so if you’ve got a beginner/intermediate level coding problem you’d like me to tackle, post it in the comments section!

Sign up for an account early to secure your spot in the live discussion!

David

28 Comments
faizan
August 26, 2015 @ 12:42 am

Hi david i like to learn salesforce but not understanding apex struggling a lot how to overcome this problem.

Reply
    David Liu
    August 26, 2015 @ 5:18 pm

    Just as it is when weightlifting – lower your weights and keep trying to progress!

    (Go back to the basics and reread until you feel more comfortable!)

    Reply
Anonymous
August 7, 2015 @ 8:57 pm

David,

I have a beginner coding suggestion that I would use everyday in a production org.

I have a custom picklist for US time zones I use for Leads, Contacts and Tasks (in list views I use it for sorting call lists – Eastern to Pacific). When I create a new task for a Lead or Contact, I would like to have trigger that copies the time zone from that lead/contact to the new task. I suspect this can also be done using Process Builder to trigger a headless flow but what I’d really like to see is your development process (or thought process) to create this trigger because that would be the same process for creating the Flow as well.

Thanks a bunch,
Chuck

Reply
Synthia B.
August 4, 2015 @ 12:16 pm

Awesome gift for my 31st birthday. Can’t wait for 08/08. Thanks David :-)

Reply
    David Liu
    August 4, 2015 @ 2:47 pm

    I’m honored LOL!!!!!

    Reply
pavithra
August 4, 2015 @ 10:21 am

Hey David, thanks so much for taking this initiative. Is it possible to have this session recorded? I am traveling and it will be hard to attend it. Thanks again!

Reply
    David Liu
    August 4, 2015 @ 2:47 pm

    Will do my best! =)

    Reply
    Chris
    August 5, 2015 @ 2:22 am

    All live sessions on Livecoding.tv are recorded. They’ll be available under the past broadcasts of David’s channel ;)

    Reply
      David Liu
      August 5, 2015 @ 8:25 am

      Thank you Livecoding.tv rep!! I guess that answers the question!!

      Reply
      David Liu
      August 7, 2015 @ 12:00 pm

      By the way – how can I get my hands on a Livecoding.tv t-shirt? =) I promise to wear it around Google campus!

      Reply
bbhuyan
August 4, 2015 @ 10:09 am

Thank you David for organizing it. Looking forward to the event.

Reply
CoolCodingChad
August 4, 2015 @ 6:57 am

Hey David, off topic but will you be attending Dreamforce 15?

Reply
    David Liu
    August 4, 2015 @ 2:48 pm

    You know it!

    Reply
Bob Poliquin
August 4, 2015 @ 6:51 am

I am trying to figure out how to add a date search to assign the correct warranty to a record. The code below assigns the record by product right now but I need to add the record with the correct cut-in and cut -off dates and by product as well. any help would be greatly appreciated.

trigger Trigger_UpdateWarranties on Unit__c (before insert, before update ) {

// Step 1: Create a set of all products of Units to query
Set allwrnty = new Set();

for (Unit__c newUnit : Trigger.new) {
if (newUnit.Product__c != null) {
allwrnty.add(newUnit.Product__c); }
}

// Step 2: Query for all the Units in Step 1
List potentialproduct = [SELECT Id, Name, Product__c FROM Warranty__c
WHERE Product__c IN :allwrnty];

// Step 3: Make a Map that lets you search for units by product
Map wrntyMap = new Map();
for (Warranty__c w : potentialproduct) {
wrntyMap.put(w.Product__c, w);
}
// Step 4: Get the matching Warranty in the Map by product!
for (Unit__c newUnit : Trigger.new) {
if (newUnit .Warranty_Type__c == null) {
Warranty__c product = wrntyMap.get(newUnit.Product__c);
if (product != null) {
newUnit.Warranty_Type__c = product.Id;
}
}
}

}

Reply
Anonymous
August 4, 2015 @ 12:23 am

Hi david ,
please try to address the viewstate topic in this event.Its a confusing topic for most of the people who are new to salesforce development.

Reply
    David Liu
    August 4, 2015 @ 2:48 pm

    There will be time for questions – feel free to bring this one up!

    Reply
Luke Vang
August 3, 2015 @ 8:00 pm

I don’t know if this is beginner stuff, but Lightning Components!

Reply
Anonymous
August 3, 2015 @ 4:01 pm

Buddy, are we gonna implement old live agent? or we gonna dig in to its replacement i.e. omni channel. I had implemented omni recently.

Reply
Aron Schor
August 3, 2015 @ 2:05 pm

For beginners, if you could walk through a couple of basic triggers that would be great. Maybe mention a few other beginner triggers one could do (maybe that are common with developers or you were among the first you did.) You don’t need to walk through each one, but a better sense of how they are used would be good. Thanks.

Reply
Bart Chapman
August 3, 2015 @ 2:01 pm

Like to see Apex page that implements Messaging.InboundEmailHandler for Email Services. Specifically reading a CSV file and creating records (asset in my case, a POS sending weekly new-sales info). I see scattered and wildly conflicting info on SFDC, stackexchange, and dev sites. I got my page to read an attached CSV (I see the lines in debug) – but cannot get it to create a record.

Reply
Sanjay
August 3, 2015 @ 1:52 pm

Hi David,

Will this session be recorded?

Sanjay

Reply
    David Liu
    August 3, 2015 @ 1:58 pm

    I’ll do my best but don’t know for sure if I can!

    Reply
Barnet Associates
August 3, 2015 @ 1:43 pm

Awesome! Would love to see an Apex class with an outer (parent) and inner (child) loop that updates a field in the child object – bulkified for governor limits. Thanks so much, looking forward to it!

Reply
CoolCodingChad
August 3, 2015 @ 1:35 pm

that’s awesome. Could you do a go to meeting as my company does not allow us to view youtube…

Reply
    David Liu
    August 3, 2015 @ 1:58 pm

    Don’t worry, it’ll be here!
    https://www.livecoding.tv/sfdc99/

    Reply
Ed
August 3, 2015 @ 1:29 pm

Awesome news!! But I’m travelling on Saturday.. Any chance the session will be recorded?

Reply
    David Liu
    August 3, 2015 @ 1:59 pm

    Will do my best but don’t know if it’ll be possible!

    Reply
      Ed
      August 3, 2015 @ 2:07 pm

      No problem, we’re super grateful to you for doing this. You’re a total rockstar David!

      Reply

Leave a Reply Cancel reply

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


*

*

Theme: Simple Style by Fimply