I've added a custom field to the Case standard object which is a lookup to Account, named Site__c

When I create a visualforce page to allow for editing of the Site__c and Account fields on a Case, they are rendered slightly differently. The (Standard) Account field has a clear button and the text input is disabled, but i can't get the Site__c field to match.

How can I achieve this? ![example] https://i.sstatic.net/aD7r1.jpg


    <apex:inputField id="Customer" label="Account" value="{!caseRec.AccountId}" style="width: 75%;" >
        <apex:actionSupport event="onblur" 
            rerender="pbSection,pgButtons,PageBlock,caseProfile" />
    <apex:inputField id="Site" label="Site" value="{!caseRec.Site__c}" style="width: 75%;" >
        <apex:actionSupport event="onchange" 
            action="{!selectmethodSite}" status="loadStatus"

1 Answer 1


The clear button near Account shows that the field is part of lookup filter.

If you want your custom lookup to have the same clear button, your custom lookup should be part of any lookup filter.

Lookup filter documentation

Hope it helps.

  • there is no filter on the Case.Account field, and adding one to the Site__c field doesn't change the appearance.
    – Dan
    Jul 7, 2015 at 11:54
  • I have updated my answer. Account is part of any lookup filter on case object. That's why it got that clear button. Jul 7, 2015 at 12:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .