Skip to end of banner
Go to start of banner

Part 1 - Building the Salesforce Account pull-down menu

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

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:


 Click here for the source code...
<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

  1. Add a List Data macro and set its Name parameter to "AccountName".

  2. Within the List Data macro, create a Report Block macro.

  3. Within the Report Block macro, add a SOQL Reporter macro.
    Set the Query parameter to "Select Name from Account".

  4. Back within the Report Block, create a Report Body macro.

  5. Within the Report Body macro, add a List Option macro.
    Set its Value parameter to "%sf:Name%"
    Do the same with the Label parameter and set the value to "%sf:Name%".

Macro structure

  • No labels