Part 2 - Building a table to display Salesforce Contacts

In this section we will build a table that displays Salesforce Contact data which can be filtered by Salesforce Account, selected by the user.

 

Source code

The following source code is shared using Confluence Storage Format, the XHTML-based format that Confluence uses to store the content of pages, page templates, blueprints, blog posts and comments.

For more information on how to use this source code on your Confluence, read the following article:

⚙️ Expand

Steps

  1. Add a Report Table macro and set its Injected parameter to "True".

  2. Within the Report Table macro, add a SOQL Reporter macro and set its Query parameter to "Select Id,Account.Name, Name,Title,Email,Phone from Contact ORDER BY Account.Name, Name".

  3. Within the SOQL Reporter macro, add a Text filter macro.
    Set its Key parameter to "sf:Account.Name"
    Set Contains Value parameter to "%data:AccountName>1%" respectively.

  4. Back within the Report Table macro, add five Report Column.
    Set their Titles to "Account Name", "Contact Name", "Title", "Email", and "Phone" respectively.

  5. Back within the Report Block, create a Report Body macro.

  6. In the "Account Name" Report Column macro, add a Report Info macro.
    Set the Key parameter to "sf:Account.Name"

  7. In the "Contact NameReport Column macro, add a Report Info macro.
    Set the Key parameter to 
    "sf:Name"

  8. In the "TitleReport Column macro, add a Report Info macro.
    Set the Key parameter to 
    "sf:Title"

  9. In the "EmailReport Column macro, add a Report Info macro.
    Set the Key parameter to 
    "sf:Email".

  10. In the "PhoneReport Column macro, add a Report Info macro.
    Set the Key parameter to 
    "sf:Phone".

Macro structure

add NEXT: Building a dashboard to display Salesforce Cases