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!

SFDC99 Summer update!

July 13, 2016

What a Summer it has been!

Our new addition to the family has brought so much joy to my wife and I! Thank you all for your newborn tips – I remind myself of a few of them on a daily basis!

As crazy as the Summer has been, the craziest part is it gets even crazier in the coming months!

7.13.16 – Apex Academy: The third installment, “The Power of SOQL” is halfway done as of today! Look out for a launch in August!

7.18.16 – Salesforce Lightning Event: I’ll be in Chicago next week meeting up with Salesforce employees and MVPs to talk LIGHTNING!

8.18.16 – San Antonio, TX User Group: Flying over to Texas to talk to their user group, I LOVE Texas!

10.04.16 – Dreamforce: I’ll be speaking at Dreamforce this year, stop by and say HI!

…back to the baby!

David

17 Comments
sfdc dev
July 28, 2016 @ 10:56 am

Hi David,

Both 1st and 2nd part of the Apex Academy were simply amazing!! I am at a level where I can write intermediate triggers and the test Classes on my own.

My question is geared towards code coverage. Will you be covering that any time sooner from the deployment perspective?

I kind of feel like I am in catch 22 situation. I am following along your guidelines to get as much coverage as possible and not be focused on 75%. The problem is, there is existing code written in our Orgs before I started with the company that does not have good code coverage (less than 75% overall code coverage), and no matter how well I write my code and try to deploy it, I am faced with the challenge of not being able to deploy because the overall code coverage is less than 75% (in Production).

Since Test classes don’t get counted towards code coverage (please correct me if I am wrong here), do I have to first write/modify the test classes that will give me better coverage for the existing classes and triggers and deploy them (test classes only) before I try to deploy the new classes, triggers, Test classes that I’ve authored?

Last question: when we talk about code coverage, it is applicable for Production right? It does not matter even if sandbox’s overall code coverage is less than 75% when deploying from sandbox to Production?

Thank you,

sfdcdev

Reply
    David Liu
    July 28, 2016 @ 11:21 am

    Thank you sfdcdev!

    Apex Academy #3 will go much deeper into code coverage!

    Here’s the short answer since you’re in a bind:
    – Code coverage is calculated for production. Your sandbox code coverage has no impact on anything
    – If your org has <75% code coverage overall, that's a VERY BAD THING! It means no one will be able to deploy any code into it anymore, which IMO is a P0 issue
    - You need to fix existing test classes or add more test classes that will bring the number up
    - It is possible that your org recently had >75% coverage but a recent change (for example, a new validation rule) lowered the coverage of test classes

    IMO you should run all your test classes and start optimizing the areas that have the least coverage and the most lines of code. Good luck!

    David

    Reply
      sfdc dev
      July 28, 2016 @ 1:06 pm

      You sir are a Gentleman and Scholar! I was not able to get a straightforward answer on the salesforce community for this. Thanks for the explanation. Looking forward to Apex Academy #3!!

      Reply
      sfdc dev
      August 5, 2016 @ 12:29 pm

      Hi David,

      Quick Question for you: Is there a documentation or steps that you can tell on How to Disable or delete an Apex Class or Trigger from a Production Organization using MavensMate ?

      There is a Documentation that Salesforce provides using Force.com IDE, but I was curious if there is any for MavensMate.

      Thank you,
      sfdc dev

      Reply
        David Liu
        August 6, 2016 @ 1:55 pm

        Yes!

        Every time you create a trigger you’ll see on the left there are two files for it. One is the actual trigger and the other is a meta file. What you want to do is change the active flag on the meta file then deploy it.

        Good luck!
        David

        Reply
Rodney
July 15, 2016 @ 10:04 am

I created a little fun theme for team mystic players:
https://chrome.google.com/webstore/detail/pokemon-go-team-mystic-th/lhbigodcjifjlcidfandkdbnmjofnhof?hl=en

Reply
    David Liu
    July 15, 2016 @ 1:23 pm

    LOL!

    Reply
Kal Gill
July 14, 2016 @ 8:17 pm

Thank you for all your assistance in helping us mere mortals ! Congrats on the baby, and it does get easier :-)

Reply
    David Liu
    July 15, 2016 @ 1:25 pm

    WHEW!!!

    Reply
Suresh Boddu
July 13, 2016 @ 7:40 pm

We are So lucky for having a GREAT Guru like you….. Thank U for Updates

Reply
    David Liu
    July 15, 2016 @ 1:25 pm

    I’m lucky to have great and hardworking students!

    Reply
Anonymous
July 13, 2016 @ 7:05 pm

Congrats David..its good to hear you after long time.

Reply
    David Liu
    July 13, 2016 @ 7:06 pm

    Thank you! =)

    Reply
Anonymous
July 13, 2016 @ 12:54 pm

Thank you for all of your hard work ,David. For the SOQL portion, will you be going over aggregate results and how to parse out multiple aggregations from one query.

Reply
    David Liu
    July 13, 2016 @ 1:29 pm

    Yup we certainly will!

    You can refer to this doc for more info in the meantime however:
    https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_SOQL_agg_fns.htm

    Reply
Chris
July 13, 2016 @ 10:53 am

Team Valor congratulates you and appreciates your hard work! :)

Reply
    David Liu
    July 13, 2016 @ 11:02 am

    LOL!

    Reply

Leave a Reply Cancel reply

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


*

*

Theme: Simple Style by Fimply