Skip to main content
I am trying to generate a lookup window that, when the icon is clicked, return a list of contacts assigned to the account in which I am searching. I understand that the lookup window requires a search, but is there a way generate the list? Should I create a different custom field?

 

I managed to set a custom filter on search results where the contact's account ID matches the searching account ID, but this still requries a search. If possible, I'd like to automatically generate a list of contact's without a search.
1 Antwort
  1. 4. Juni 2015, 19:32
    Hello John,

     

    I don't think there's a way to customize the lookup window behavior any further than what you have already done without using a custom programmatic solution like Visualforce .

     

    However, if you simply want to see a list of all contacts associated with the Account , you can create a  Custom link on Accounts that will open up a report on the Account's Contacts

    . Here's a step by step process on how to do that:

    1. Create the required Contact Report from the Reports tab.

    2. Customize this report as follows:

    -Include whatever columns you want to see in the final report.

    -In Advanced filters specify Account Name equals.

    3. Save the report.

    4. From the Reports Tab, run this report.

    5. Copy the URL for using in the Custom Link.

    6. To create the Custom Link click on:

    Setup | App Setup | Customize | Accounts | Buttons and Links

    7. Create the Link Label = "Contacts on this Account" and Link Type = URL

    8. Click "Next".

    9. For Link URL - Paste the URL copied earlier when running the report.

    To the URL append ?pv0={!Account_Name}

    - {!Account_Name} is the merge field for the Account name.

    So the link looks like this:

    https://emea.salesforce.com/00O20000000lNE1?pv0={!Account_Name}

    *** IMPORTANT! Make sure there are no line breaks in the above text, it needs to be one long string.

    10. Choose the defaults for the subsequent steps and "Save".

    11. Add the Custom Link to the Account page layout(s). You would need to add it to each Account page layout you want it to appear on. Click on:

    Setup | App Setup | Accounts | Page Layouts | Edit.

    12. Drag the Custom Link from to the Useful Links section on the page layout and click "Save".

    You should now be able to select this link from an Account detail page.