Part 1 - Building the Salesforce Account pull-down menu

Overview

In this section, we'll build a Salesforce account selector where the user will be able to select what Account to filter by using a pulldown menu with a list of available Salesforce Accounts. This is built using a combination of Scaffolding and Reporting apps.

To select the account, the user will then have to click the Edit Contents button on the Confluence page.

 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 - How do I use Recipes that use the Storage Format with the Confluence Source Editor?

<h3>Select the Account: </h3> <p> <br/> </p> <ac:structured-macro ac:macro-id="a50e636f-e28f-4a96-9738-67e177b634e3" ac:name="list-data" ac:schema-version="1"> <ac:parameter ac:name="name">AccountName</ac:parameter> <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter> <ac:rich-text-body> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="46f7e7f4-7f5d-49d8-91e2-e0d57358fe7b" ac:name="report-block" ac:schema-version="1"> <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter> <ac:rich-text-body> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="de3130ef-de85-4224-82f1-d1e55ea4baf3" ac:name="soql-reporter" ac:schema-version="1"> <ac:parameter ac:name="query">Select Name from Account</ac:parameter> <ac:rich-text-body> <p> <br/> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="c4a4f4f9-5dc6-4e86-87a6-149553f2fd4a" ac:name="report-body" 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="16f12ee4-c2a2-4b9c-b30c-37dea8eae969" ac:name="list-option" ac:schema-version="1"> <ac:parameter ac:name="label">%sf:Name%</ac:parameter> <ac:parameter ac:name="value">%sf:Name%</ac:parameter> <ac:rich-text-body> <p> <br/> </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> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> </ac:rich-text-body> </ac:structured-macro>

Steps

On a draft page

  • add a List Data macro

    • set its Name parameter to "AccountName"

Within the List Data macro

In the Report Block macro

In this Report Body macro

  • add a List Option macro

    • set its Value parameter to "%sf:Name%"

    • also set the Label parameter to the same value "%sf:Name%"

Macro structure

Next

https://appfire.atlassian.net/wiki/spaces/USECASES/pages/478512788