function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sfdc wonderSfdc wonder 

How to give User Lookup in Visualforce Page

Hi,

i was implemented send email functionality  with attachments through apex.In this end user enter email address,name,Body,Subject,selecting Attachments.Every thing working fine but i have to enhance the functionality like adding cc and Bcc inputfields with User lookups like salesforce Standard send an Email functionality.

can any one suggest me how to achieve thease User lookups in Visualforce Page.
Sfdc wonderSfdc wonder
Hi Arun,

My functionality used in Detail Button of Lead and Account,that's why i'm use controller in my Vf page so that it works any Sobjects.i was using inputText instead of inputfield...can u give me any idea
Shashikant SharmaShashikant Sharma
Hi,

You could create proxy instance of any object like and use it on page. It will work for all objects.

Like
public Contact conForToAddress {get;set;}
initialize it in constructor 

conForToAddress = new Contact();

and on VFP use
<apex:inputField value="{!conForToAddress.OwnerId}" required="false">
Change the lable on VFP so that it does not say Owner.

Although to provde other facilities like native email send screen you need more customization.




Sfdc wonderSfdc wonder
User-added image




hi we are looking above type of standard functionality.i.e,in CC,Additional To are takes multiple mails.

can any one help us how to achieve above CC and Bcc lookup fields.