Monday, October 28, 2013

Insert Merge Field Shortcut for Word (Conga Mail Merge)

Below are the shortcut keystrokes for entering a Mail Merge field into a word document.

ALT - I - F - M - M

From there you would just copy the Salesforce field name into the field name and click OK.

Tuesday, October 22, 2013

Link to local file in Salesforce

It seems there is no really easy way to link to a local file from Salesforce. After researching this topic in detail the blog post below provides the best solution to including this functionality in Salesforce. The biggest pain point in this solution for the user is that you can not click a button and be directed right to the document/folder. You have to copy the link stored in the formula field you create and copy that into a new browser window. The post takes you through the step by step process very well though.

http://salesforcetechie.wordpress.com/2013/07/19/linking-to-local-folders-in-salesforce-records/

Monday, October 21, 2013

Apex Trigger - Only Run at Point of Entry

You can put in a very simple condition that will prevent a trigger from running when bulk updates are made. This will only let the trigger run when one record is being edited at a time. This will exclude List View updates and data loader insert/updates:

if (Trigger.new.size() == 1) {

if (Trigger.old[0].isConverted == false){

}

}

Friday, October 18, 2013

Trigger Before and After Explanation

  • Before triggers can be used to update or validate record values before they are saved to the database.
  • After triggers can be used to access field values that are set by the database (such as a record's Id or lastUpdated field), and to affect changes in other records, such as logging into an audit table or firing asynchronous events with a queue.

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_triggers.htm

Wednesday, October 2, 2013

Lead Conversion Trigger

Below is the syntax for a lead convert trigger.

trigger test on Lead (before update) {
 for(Lead lead:System.Trigger.new) {
  if (Lead.IsConverted)
  //do somethign here with converted leads
 }
}

Below is a more built out example from Jeff Douglas

http://blog.jeffdouglas.com/2009/02/13/enhancing-the-lead-convert-process-in-salesforce/