You need to sign in to do that
Don't have an account?
AnnaT
Lookup button on inputfield is not displayed
I'm creating editable table.
When I create lookup field, lookup button is not displayed.
My code is this.
<apex:page standardStylesheets="true" showHeader="True" sidebar="false" standardController="CR_CO__c" recordSetVar="crco" > <style> .headerStyle{background-color:#0099FF;color:#000000} .dateStyle{width:250px} </style> <apex:form > <apex:commandButton action="{!save}" value="Save" id="theButton"/> <body> <table border="2" > <td><apex:inputField value="{!cro.Location__r.Name}" /> </td> </tr> </apex:repeat> </table> </body> </apex:form> </apex:page>
You wouldn't specify a lookup field this way:
as that allows the user to overwrite the name on the related record.
Instead, use the following, which will allow you to overwrite the relationship field:
All Answers
Hi,
Use correct lookup field API name. Check your object and it's lookup field. replace the inputField value with that lookup field API name.
If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.
Chamil's Blog
You wouldn't specify a lookup field this way:
as that allows the user to overwrite the name on the related record.
Instead, use the following, which will allow you to overwrite the relationship field:
Thank you for your help!!
I could create lookup button.
Thank you so much!!!
Anna
I tried your example, but the field is only shown on the preview of the page, running the site the field is missing
Is the lookup field exposed to the guest site user profile?
I think yes, the field is visible for all my users, is there a way to verify?
Thank you Bob!
If this is an unauthenticated site, you can check via the public access settings button on the site detail.
The profile will also need read access to the sobject that the lookup points to.
The profile have access to Lead, contacts, api, search phrase and new object, access to vf pages and access to the standar search pages i don't know what could be missing.
In the preview of the page i can see the lookup field but when i access to the site... is not there!
Have you checked the field level security, not just the object level?