Posts tagged salesforce

Searching existing contacts based on a lead


I went to the London user group last year and quite a few people were interested in an app which when your looking at a lead automatically searches for existing records within salesforce. So I’ve just created a quick Salesforce app to allow you to search existing contacts based on a lead. It only searches contacts at the moment but I’ll get it to search other objects too if people are interested in it. Its also limited to just searching based on email address at the moment as well, but again if people are interested i’ll expand it.

If you want it give me a shout and i’ll send you a link to the package so that you can install it in your org, a “one click” install. But if your feeling adventuous and want to do it manually you can follow the brief instructions below, but you do need to know the basics of how to edit and create apex classes and pages:

Create searchContacts class:

public with sharing class searchContacts {

private final Lead thisLead;
public Contact [] contactObj { get; private set; }

public searchContacts(ApexPages.StandardController stdController) {
this.thisLead = (Lead)stdController.getRecord();


public Contact [] getContacts(){

System.debug('controller Id: ' + this.thisLead.Id);

Lead EmailAddress = [Select l.Email from Lead l WHERE l.Id = :this.thisLead.Id];

System.debug('getContacts Lead: ' + EmailAddress);

contactObj = [Select
from Contact c
WHERE c.Email = :EmailAddress.Email ];

return contactObj;

Create a searchContacts Page:
<apex:page standardController="Lead" extensions="searchContacts">
<apex:pageBlock >
<apex:pageBlockTable value="{!contacts}" var="item">
<apex:column value="{!item.Name}" />
<!--            <apex:column value="{!item.Id}" />-->
<apex:column value="{!item.AccountId}"/>
<apex:column value="{!item.Title}" />
<apex:column value="{!item.Email}" />

In the page above i’ve just pulled out Name, AccountId, Title & Email fields, but if you have custom fields or other fields you want to pull out just copy one of the apex:column lines and change the field name (!item.xxxxx)

Next all you need to do is add the visualforce page to the Lead page layout, also don’t forget if you have different profiles that you go in to them and give access to the visualforce page otherwise other users won’t be able to see the visualforce page.


Magento to Salesforce plugin anyone?


I’ve been working on a Magento to Salesforce plugin and i’m interested in seeing if anyone wants to use it or has any features that they want me to put into it?

Ii’ve setup a uservoice to collate ideas.

SalesForce 9 Released


Salesforce Summer 2009

This week saw SalesForce launch version 9 of their popular online CRM product. The two things that interested me the most were the workflow visualiser and the free version of the SalesForce platform:

Workflow Visualiser & Process driven CRMs

In the CRM world there are three main types of CRM vendors; interactive, process driven and record centric CRMs:

CRM Vendor Types Current Market Leaders
Interactive eGain Communications
KANA Software
RightNow Technologies
Business Process Driven Sword Ciboodle
Record Centric Microsoft
Oracle Siebel
Oracle CRM on Demand

At the moment the market leader for process driven CRMs is Ciboodle (who I used to work for) and with the Workflow visualiser it really reminds me of Ciboodle and a more process-driven CRM. Ok, you’ve always been able to do workflow in salesforce but they are now allowing you to see visually what your workflow actions are doing and how they flow into each other and with complex workflow actions this is really good news. The only limitation being you can only see your workflow and have to go back to salesforce to continue to edit the workflow. (more…)

Go to Top