Last week, at Snowforce in Salt Lake City, I saw a demonstration of the Lightning App Builder and decided that I wanted to make a Lightning component of my own. I thought the best thing to do was to follow the quick-start PDF, and was quite proud of that. I made the text say "Hello […]
Chatter Publisher Actions (Part 2): Object Custom Action
In the previous post, we looked at using the standard (button-click) way to create a new child record using Publisher Actions. Pretty basic stuff. Using Visualforce to create a custom action is a bit harder. Let's start with the documentation. The PDF provided by clicking on the link in the Actions screen (Account action is […]
Create and Populate a Map<Id, Sobject> Without Loops
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
. (Some will prefer to use
, and that is okay too.) We […]
1 |
Map<id, Contact> |
1 |
Map<string, Contact> |
Workflow ISCHANGED() translated to Apex trigger
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 […]
PageReference Best Practice
I've seen a lot of coders put the following into their custom Visualforce controllers:
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
), […]
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; } |
1 |
/<recordID> |
- 1
- 2
- 3
- 4
- Next Page »