• Welcome
  • About
    • Leadership
    • Blogroll
  • Force-Squared Blog
  • Support
    • Knowledge Base
    • Log a Case
  • Is It Dreamforce Yet?
  • Welcome
  • About
    • Leadership
    • Blogroll
  • Force-Squared Blog
  • Support
    • Knowledge Base
    • Log a Case
  • Is It Dreamforce Yet?
  • Tips and Tricks
  • Configuration
  • Development
You are here: Home / Archives for David Schach

Entries by David Schach

Create and Populate a Map<Id, Sobject> Without Loops

July 25, 2012 by David Schach 7 Comments

There are many reasons to use Maps in Apex triggers. Sometimes I want to make a List of Contacts, but I want to pull each one by its ID. This is a good reason to abandon the List and to make a
Java
1
Map&lt;id, Contact&gt;
. (Some will prefer to use
Java
1
Map&lt;string, Contact&gt;
, and that is okay too.) We […]

Filed Under: Apex, Tips and Tricks Tagged With: Apex, Force.com Platform

Filed Under: Apex, Tips and Tricks Tagged With: Apex, Force.com Platform

Workflow ISCHANGED() translated to Apex trigger

February 2, 2012 by David Schach 2 Comments

Workflow is great. I can simply and declaratively make changes, and can easily update things like email templates, criteria, tasks, etc. without using Eclipse and writing/running unit tests. Sometimes, however, workflow isn’t enough; we need to use a trigger. Today, I had a use-case that when a DateTime field is filled, a contact (identified via […]

Filed Under: Apex, Configuration, Tips and Tricks Tagged With: Apex

Filed Under: Apex, Configuration, Tips and Tricks Tagged With: Apex

Best Practice: Multiple Chatter Posts of the Same File

August 11, 2011 by David Schach 1 Comment

List of available files to attach. The leftmost column is a hyperlink of the word "attach."

Salesforce Administrators learn to remind users: “Search before you create a new lead.” Pretty simple, right? Duplicated records are a pain. Then why do I see some very accomplished Salesforce users in the Dreamforce app posting duplicate Content/Files in Chatter? Here are some examples from the Files tab: The better thing to do – assuming […]

Filed Under: Configuration, Native Application, Salesforce CRM, Tips and Tricks Tagged With: Chatter, Configuration, Content, Dreamforce

Filed Under: Configuration, Native Application, Salesforce CRM, Tips and Tricks Tagged With: Chatter, Configuration, Content, Dreamforce

Next Birthday Formula

July 6, 2011 by David Schach 4 Comments

How would you display your Contacts with upcoming birthdays? I’ve seen people use “Birthdays This Week,” “Birthdays This and Next Week,” and other reports to display the list. I’ve also seen requirements for showing a person’s next birthday, to trigger an automatic email to each Contact on his/her birthday. Let’s see how it’s done: [sourcecode […]

Filed Under: Configuration, Salesforce Tagged With: Apex, Force.com Builder, Force.com Platform

Filed Under: Configuration, Salesforce Tagged With: Apex, Force.com Builder, Force.com Platform

PageReference Best Practice

May 5, 2011 by David Schach 2 Comments

I've seen a lot of coders put the following into their custom Visualforce controllers:
Java
1
2
3
4
5
6
7
8
9
10
public PageReference customsave() {
    try{
        insert acct;
    } catch (DMLException e) {
        /*do stuff here*/
    }
    PageReference acctPage = new PageReference ('/' + acct.id};
    acctPage.setRedirect(true);
    return acctPage;
}
I've decided that I don't like this approach. It feels too much like a URL hack, and though I'm sure that it will always work (meaning that salesforce.com will never change its way of referring to a record by
Java
1
/&lt;recordID&gt;
), […]

Filed Under: Apex, Development, Salesforce, Visualforce Tagged With: Apex

Filed Under: Apex, Development, Salesforce, Visualforce Tagged With: Apex

  • « Previous Page
  • 1
  • 2
  • 3
  • 4
  • …
  • 17
  • Next Page »

Is it Dreamforce Yet?

Find out!

Find us on the AppExchange

Mass Update Contacts Pro

Get It Now



Mass Update Contact Address

Get It Now


Recent Posts

  • Lightning Component With Running User Information
  • ChatterBINGO is Now Open-Source
  • Display Only My Role’s Records on a Report
  • Chatter Publisher Actions (Part 2): Object Custom Action
  • Chatter Publisher Actions (Part 1): Create a Record

Post Categories

Salesforce Blogs

  • Arrowpointe
  • Force Monkey
  • The Silver Lining
  • Vertical Coder
  • Salesforce Source
  • Technology, Coding and Bears… OH MY!
  • TehNerd
  • Embracing the Cloud
  • Decoding Salesforce
  • MK Partners

Popular Tags

#df09 #df10 Akismet Apex AppBuilder AppExchange Appirio Astadia Blogs Chatter Configuration Content DreamFactory Dreamforce Eclipse IDE Enterprise Force.com Builder Force.com Platform Google Infowelders Integration Just for fun Lightning New Developments New Features Partner Program PersonAccount Projects Publisher Salesforce Salesforce1 Salesforce for Google Apps sfdcverse Sites Visualforce Web-to X-Squared On Demand

Like Us on Facebook

Like Us on Facebook

Share This Page

Find Us Online

  • Twitter
  • Facebook
  • LinkedIn
  • Google Plus
  • X-Squared G+ Page
  • RSS

Subscribe

RSS Feed Comments

Subscribe via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 5,089 other subscribers

Copyright © 2008–2021 X-Squared On Demand · Genesis Framework by StudioPress · WordPress · Log in