Table of Contents |
---|
minLevel | 1 |
---|
maxLevel | 6 |
---|
outline | false |
---|
type | flat |
---|
separator | pipe |
---|
printable | false |
---|
|
Overview
In this section we will build a table that displays Salesforce Contact data which can be filtered by Salesforce Account, selected by the user.
Image Modified
...
...
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.
Info |
---|
For more information on how to use this source code on your Confluence, read the following article |
...
Expand |
---|
title | Click here for the source code...Source code |
---|
|
Code Block |
---|
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="27383614-8004-485c-ab61-cd08d23dd0de" ac:name="report-table" ac:schema-version="1">
<ac:parameter ac:name="injected">true</ac:parameter>
<ac:rich-text-body>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="55cbe342-8575-483b-a1c0-bf1b2c7299b1" ac:name="soql-reporter" ac:schema-version="1">
<ac:parameter ac:name="query">Select Id,Account.Name, Name,Title,Email,Phone from Contact ORDER BY Account.Name, Name</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="df1371cc-21df-4500-88ac-ecbbc3030e19" ac:name="text-filter" ac:schema-version="1">
<ac:parameter ac:name="contains">%data:AccountName>1%</ac:parameter>
<ac:parameter ac:name="">sf:Account.Name</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="dc53d519-e0a9-4105-b354-70afb90aea20" ac:name="report-column" ac:schema-version="1">
<ac:parameter ac:name="title">Account Name</ac:parameter>
<ac:rich-text-body>
<p class="auto-cursor-target">
<ac:structured-macro ac:macro-id="92f6aa94-b64a-492d-a611-8acdc9b752ab" ac:name="report-info" ac:schema-version="1">
<ac:parameter ac:name="">sf:Account.Name</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="c6007c06-8fb1-4ec4-abf7-908192ee33d9" ac:name="report-column" ac:schema-version="1">
<ac:parameter ac:name="title">Contact Name</ac:parameter>
<ac:rich-text-body>
<p class="auto-cursor-target">
<ac:structured-macro ac:macro-id="c5d23791-e17c-46bb-98aa-461fab09a6fc" ac:name="report-info" ac:schema-version="1">
<ac:parameter ac:name="">sf:Name</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="4ac2bf3f-b682-431e-8f3b-fe2db34344ae" ac:name="report-column" ac:schema-version="1">
<ac:parameter ac:name="title">Title</ac:parameter>
<ac:rich-text-body>
<p> <ac:structured-macro ac:macro-id="e8315644-8314-4108-b8c8-433ee8301b84" ac:name="report-info" ac:schema-version="1">
<ac:parameter ac:name="">sf:Title</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="ae5e6fdc-b34b-4323-af68-0e4492dd945e" ac:name="report-column" ac:schema-version="1">
<ac:parameter ac:name="title">Email</ac:parameter>
<ac:rich-text-body>
<p class="auto-cursor-target">
<ac:structured-macro ac:macro-id="8c21f0e3-8b7c-4ffd-af51-89652ca54913" ac:name="report-info" ac:schema-version="1">
<ac:parameter ac:name="">sf:Email</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="53475e16-7e92-4df1-86a0-625a3da2b203" ac:name="report-column" ac:schema-version="1">
<ac:parameter ac:name="title">Phone</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="ec988b1b-0f4e-452d-9177-f755c54b28eb" ac:name="report-info" ac:schema-version="1">
<ac:parameter ac:name="">sf:Phone</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p> |
|
Steps
Ona draft page
...
...
Within the Report Table macro
...
...
set its Query parameter to "Select Id,Account.Name, Name,Title,Email,Phone from Contact ORDER BY Account.Name, Name
"
...
...
In this SOQL Reporter macro
...
...
...
...
...
Back within the Report Table
...
macro (below the SOQL Reporter macro)
...
macros
set their Titles to "Account Name", "Contact Name", "Title", "Email",
...
...
In the "Account Name" Report Column
...
macro
...
...
...
In the "Contact Name" Report Column macro
...
...
...
...
In the "Title" Report Column macro
...
...
...
...
In the "Email" Report Column macro
...
...
...
...
In the "Phone" Report Column macro
...
...
...
...
Macro structure
Image Removed
...
Next
Part - 3 Building a dashboard to display Salesforce Cases