This guide will show you how to display a list of accounts matching a chosen string using SOQL. This is achieved with the use of the SOQL Reporter macro and also the Reporting for Confluence Server & Data Center add-on.

Ingredients

Apps

Connector for Salesforce & Confluence Server & Data Center, Reporting for Confluence

Macros

SOQL Reporter

Guide

  1. Create Report Table macro.

  2. Within the Report Table macro, create a SOQL Reporter macro.
    Edit the soql-reporter macro and enter the following in query field:

    Select Name,Owner.Name,CreatedDate from Account where Name like '%ted%'
    CODE

    This SOQL query will search Salesforce for all Name entities in Accounts that contain the string "ted" and will also return the related Owner.Name and CreatedDate values as well. (You may want to change the string to something more suitable to your Salesforce instance.)

    For more information on SOQL, consult the Force.com SOQL and SOSL Reference pages.

  3. Back within the Report Table macro, create a Report Column macro, and give it a Title of "Name".

  4. Within the "Name" Report Column macro, create a Report Info macro.
    For the Key, enter "sf:Name".

  5. Now, create another Report Column macro within the Report Table macro and give it a Title of "Owner Name".

  6. Within the "Owner Name" Report Column macro, create another Report Info macro.
    For the Key, enter "sf:Owner.Name".

  7. Now, create the final Report Column macro within the Report Table macro and give it a Title of "Created".

  8. Within the "Created" Report Column macro, create another Report Info macro.
    For the Key, enter "sf:CreatedDate".

  9. You should have something that looks like this:

     

  10. Click Save and check the results. 

Notes

For more information on SOQL, consult the Force.com SOQL and SOSL Reference pages.

Result

You should have something that looks like this: