Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Live templatetemplateStepByStep Guide LiveTemplateThis guide will show you how to use the Salesforce Reporter macro to display a table listing Salesforce Accounts that match a specified string. This is achieved with the use of the Reporting for Confluence add-on.

Ingredients

Apps

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

Macros

Salesforce Reporter

Guide

  1. Create a Report Table macro and edit it so that Injected is checked:

    Image Added
  2. Within the Report Table macro, create a Salesforce Reporter macro.
    Edit it, and enter the (Salesforce) Object you would like to search in.
    For this example, let's enter "Account".

  3. Let's also filter the results. In this example, let's filter the results using the Industry field in Salesforce Accounts, by limiting to fields that contain the word "energy".
    In the condition field, enter "Industry=like:energy".
    For more information about using Conditions, consult the SalesForce.com Confluence Query Conditions.

  4. Now, within the Salesforce Reporter macro, create a Text Sort macro.
    Edit the Text Sort macro and enter "sf:Name" for the Key. (This uses the Salesforce Supplier.)
    It should look something like this:

    Image Added
  5. You should now have a set of macros that look like this:

    Image Added
  6. Now, back within the Report Table macro, and under the Salesforce Reporter macro, create a Report Column macro and give it a Title of "Industry".

  7. Within that Report Column macro, create a Report Info macro.
    For the Key, enter "sf:Industry".

  8. Now create another Report Column macro and give it a Title of "Name".

  9. Within that Report Column macro, create an HTML macro.
    Within the HTML macro, enter the following code:

    Code Block
    <a href="https://ap1.salesforce.com/%sf:Id%">%sf:Name%</a>

    Here we are using Parameter Injection to provide the proper values for the Salesforce ID and Name to form a proper URL which is then hyperlinked when the user clicks on the Industry Name.
    This is also why we checked the Injected checkbox in Step 1 so that the resulting URL is properly rendered.

  10. Now, create another Report Column macro and give it a Title of "Created Date".

  11. Within that Report Column macro, create a Report Info macro.
    For the Key, enter "sf:CreatedDate".

  12. Create the final Report Column macro and give it a Title of "Last Modified Date".

  13. Within that Report Column macro, create another Report Info macro.
    For the Key, enter "sf:LastModifiedDate".

  14. You should now have something that looks like this in the editor:

    Image Added

     

  15. Do take note that your Salesforce instance may be different, so do change the values to make this example work for you, e.g. you may want to change the search condition from "energy" to something else that is more relatable to your Salesforce data.

Notes

For more information regarding Reporting keychains, consult the Understanding Key Concepts.

Result

You should have something that looks like this:

...