...
This 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
Create a Report Table macro and edit it so that Injected is checked:
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".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.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:You should now have a set of macros that look like this:
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".
Within that Report Column macro, create a Report Info macro.
For the Key, enter "sf:Industry".Now create another Report Column macro and give it a Title of "Name".
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.Now, create another Report Column macro and give it a Title of "Created Date".
Within that Report Column macro, create a Report Info macro.
For the Key, enter "sf:CreatedDate".Create the final Report Column macro and give it a Title of "Last Modified Date".
Within that Report Column macro, create another Report Info macro.
For the Key, enter "sf:LastModifiedDate".You should now have something that looks like this in the editor:
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:
...