You need to sign in to do that
Don't have an account?
Javascript error - lookup filter in VisualForce page
I'm using a Visualforce page to edit Opportunities and I want to filter the Contact list to only show Contacts who have the same Account as the Opportunity.
I'm using this Visualforce code for the contact field - it's a custom lookup field.
<apex:inputField id="contactField" value="{!opportunity.Primary_Contact__c}" />
If I define a lookup filter on the contact field, I get a javascript error when I try to open the popup. "TypeError: a is undefined." Looking at the javascript source code doesn't help me because the variable names aren't descriptive - a, b, c, d, etc ... I have no idea what this javascript code is referencing or what it's trying to do.
Is there a way to fix the javascript error or at least get a more helpful error message?
When I disable the lookup filter, my Visualforce page works great - except there are too many invalid choices in the contact popup.