You need to sign in to do that
Don't have an account?

Look Up Field Question
I am working with a custom object that has a look up field. I was wondering if it is possible to plug in a partail name into the look up field and then search using the look up field. I know I can type the name into the look up and that works but I would like to auto fill the lookup field with a partail name. Im not sure if this is possible and would like some guidence. Thanks.
Hi Danny
Please try the following it is working perfectly for in my Organization.
Plase note that the contact__c is a custom lookup field and while page loading the value is set as my user first name.
Hope this solves your problem.
All Answers
We cannot do on Standard page layouts.
We need to design the Visual force page for this.
We have jQuery (autocomplete) for this.
Here is the link for it
Try this. Else let me know I will share a piece of code which I have worked before.
Thanks
Hi Danny,
With standard salesforce lookup it is pretty imposible.But Since for every problem there is a solution,you can write a Javascript to get the apex form, you can then find the the input field where you will enter the default value by another javascript statement.This process should happen while the page loads.
Here is the sample code.
The above javascript will execute while the page loads and your Lookup Field will be plugged with the default value.
provided in the javascript.The limitation is the lookup should be inside the first <apex:form tag ,or else else you need to change the index of the array in the first javascript statement Try with the same logic it is working for me.Feel free for further clarification.
Shebin,
I tried your method and it did not seem to work for me.
Also I don't want the field to auto complete. I want to be able to put the users first name into the look up field from a page load and then use the look up field to search salesforce for a contact record that has a similar first name.
Hi Danny
Please try the following it is working perfectly for in my Organization.
Plase note that the contact__c is a custom lookup field and while page loading the value is set as my user first name.
Hope this solves your problem.
It worked, there is one thing that I noticed however. It only worked in the showHeader attribute was set to false. If it is set to true it does not work.
Thats kind of strange but this was very helpful Thank you.