How to select Chatter Free user from a standard user lookup field in salesforce?

4:38 PM

Reference: This example uses the great search component provided by . His blog is here 
http://blogforce9.blogspot.com/

Problem:

Using a standard lookup field on the user object, Salesforce does not allow you to lookup a user who is of the license type 'Chatter Free'.

Solution:

Although you cannot use a standard UI to update the user lookup field with a chatter free user, you can update the field through the API. This means that we could use a visualforce page to populate the lookup field.

Assumptions:
We will use a custom type ahead advanced search component.
We will use a custom field 'Chatter Free user lookup' on the account object.

STEP 1:
Install the autocomplete search component from here

http://blogforce9dev-developer-edition.ap1.force.com/ProjectDetail?id=a0290000009KusM


STEP 2:

Create the following apex class


STEP 3: Create the following visualforce page:democustomlookup

STEP 4: Create a new custom button on the account object.
STEP 5:

Add this custom button to the page layout and you are done.

RESULT:

0 comments

AD