You need to sign in to do that
Don't have an account?
sfdc integrator.ax1790
How to select multiple contacts in lookup field.
Hi,
How to select multiple contacts in lookup field. Is this possible?
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Hi,
How to select multiple contacts in lookup field. Is this possible?
Yes you have to keep in some variable the search results.
For e.g after searching a contact when it appears in the box you can keep a button beside, then clicking on that will store that contact name in a variable. Again you an search for contacts, then again click that button to add the second contact in that variable. Then follow the above code I mentioned above.
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
All Answers
No this is not possible. Lookup field is created on child object referncing its parent. So in the child record you can select one parent at a time. If you want to create many to many relationship, then create a junction object between the two objects.
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
Thanks for your reply,
I have parent child relation with contact and even. i need to schedule a meeting for an event. to which i need to select multiple contacts for the event.
How do i accomplish this. It this possible to have any visualforce pages to get multiple records at a time.
Yes you can select as many contacts as you want in the apex class and then assign that contact list to schedule a meeting for an event.
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
Hi,
Can you please send me the code
Depending on what exactly what kind of output you require, you might also want to look into the Shared Activity functionality. It does something along the lines of what you're asking and doesn't require any code.
http://appexchange.salesforce.com/help/doc/en/activities_shared_about.htm
Hi,
I am haveing a visualforce page which has the standard controller as "Event". I am having a input field with the value {!event.whoid}. so it gets a looup.
Here in the input field i need to get multiple contacts.
Thanks for posting.
There are many scenarios for that multiple contact selection. If you want to make dynamic you have to create some text boxes in the vf where users need to input some contact name(comma separated) whom they want to schedule for event, then based on that input values you can query in the controller, thats a big functionality.
What you can do is create a String variable in apex named
public String contactNames{get;set;}
public List<String> selConList = new List<Contact>();
public List<Contact> conList = new List<Contact>();
public void getContacts(){
if(contactNames != NULL && contactNames != ''){
selConList = contactNames.split(',');
if(selConList.size()>0){
conList = [SELECT id, name FROM Contact WHERE name in :selConList];
}
}
}
Then you can get those contacts in conList which you want to schedule for event.
VF
<apex:inputtext value="{!contactNames}"/>
<apex:commandButton action="{!getContacts}" value="Select Contacts"/>
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
Hi souvik9086,
Thanks for the reply,
But this is not the real time scenerio. In the code that you specified that we need to give the names in the text field manually, What if the end user don't know the full name of the contact.
thnx
suresh
YEs as I mentioned there are many scenarios you can do another workaround like create a search box for contact names and when the user types one two words for the contact then it displays the full name and from there you can work with those.
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
hi souvik9086,
Thanks,
But still the same issue even the search box takes only one value.
Yes you have to keep in some variable the search results.
For e.g after searching a contact when it appears in the box you can keep a button beside, then clicking on that will store that contact name in a variable. Again you an search for contacts, then again click that button to add the second contact in that variable. Then follow the above code I mentioned above.
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
Thanks
Rithu