App Objectives

  • The end user will search for and select an Account.
  • Based on the account selected, the app will automatically retrieve all Opportunities into Excel.
  • For the Account, the app will include the Name and Phone fields.
  • For each Opportunity, the app will include the Name, Amount, Close Date, and Stage fields.
  • Allow the end user to save modifications to the Amount and Stage fields for each Opportunity.

App Components

 You will use the following app components to build your new app:

ComponentComponent Description


Account (Individual) and Opportunity (List)

Display Map

Individual and List fields per objectives

Save Map

Using fields from the Display Map


  • Search and Select Action for the Account
  • Query Action to retrieve the Opportunities for the Account
  • Display Action to transfer the retrieved data to the Display Map
  • Save Action to save back to the environment any user modifications

Action Flows

One Action Flow to retrieve the data and display it and one Action Flow to save the data

User Menus

One button for the user to retrieve opportunities and one to save opportunities to your environment.

To create the Opportunities by Account App 

  1. In the ribbon menu, click Apps and select New Application.
  2. In the App Name Field, type Opportunities by Account.
  3. In the Select Template section,click the New radio button.
  4. Click Create.
  5. For the app type, select the product edition. For example, Enterprise.

To select Objects

  1. Click Objects and locate Account > Opportunity and then click Add Child Object.
  2. In the right-hand window, click Account (Ind).
  3. Select fields from Add Fields below area: Region, Name and Phone.
  4. Click Apply. Note: You must click Apply after you have selected the fields for any object.
  5. In the right-hand window, click Opportunity (List).
  6. Select fields from Add Fields below area: Account Id (automatically selected for you because this is the lookup field to the parent object in the object hierarchy), Amount, Close Date, Name, and Stage.
  7. Click Apply.
  8. Click Save and Close.
  9. Click Save App.

To create a Display Map

  1. Select Display Maps and click Create.
  2. In the Name field, type Main and from the Type list, select Individual.
  3. Drag the Account Name field to C3 and Phone to C4. You will see the link between the cell and field stamped in the bottom right-hand window.
  4. Switch to List.
  5. Drag the Name field to B7, Amount to C7, Close Date to D7, Stage to F7, and Id to H7. Now click on the orange Account iD field (with a + next to it) and it will take you to the Account object. Select the Region field from there and drag it to G7. X-Author allows you to have fields from any related object on the same list row.
  6. Select Options and change the Sort by picklist to Name.
  7. Save the Display Map and click Close.
  8. Add a title to B1: Opportunities by Account.
  9. Save the Display map.

To create a Save Map

  1. Select Save Map and then click Create.
  2. In the Name field, type Main.
  3. Click Add Display Map Fields and select Amount and Stage.
  4. Click Apply and then click Save.
  5. Click Save App.

To create a Search and Select Action

  1. In the main ribbon under Actions, click the arrow and select Search and Select.
  2. In the Action Name field, type Select Account.
  3. From the Objects list, choose Account.
  4. In the Search window, click the check box next to Name.
  5. In the Name in Fields to Display in Search Results, click the check box next to it and the Sort check box to the right.
  6. From the Results area, choose Single.
  7. Click Save.
  8. Click Save App.

To create a Query Action

  1. Click the arrow under Actions on the X-Author for Excel ribbon and select Query.
  2. In the Action Name field, type Query Opportunities.
  3. From the Object list, choose Account.Opportunity.
  4. In the Filters section, click the lookup icon and select the account id field to restrict the Opportunity records to those that match the Account that was selected by the user. Because this is a lookup field, click just to the right of the orange field to select the row and click Apply. Select the other parameters based on the table below.

    Object and FieldValue TypeOperatorValue
    Account IDInputEqualsAccount Id from the Accounts object will default. (Account.AccountID)
  5. Click Save.

To create a Display Action

  1. Click the arrow under Actions and select Display.
  2. For the Action Name, type Display Opportunities.
  3. From the Display Map list, choose Main.
  4. Click Save.
  5. Click Save App.

When data has been retrieved from the environment, it is placed in Excel memory, waiting to be placed into the specific worksheet based on a Display Map. You may want to display different maps at different times when your App is in use, so a Display Action lets you decide which map to use and when to use it.

To create a Save Action

  1. Click the arrow under Actions and select Save.
  2. In the Action Name field, type Save Opportunities.
  3. From the Save Map list, select Main.

Now that you have created your actions, you need to create Action Flows to retrieve and display data and to save data.

To create a flow to retrieve and display Opportunities

  1. Click Action Flow and then click Create.
  2. Enter Retrieve Opportunities into the Action Flow Name field and click Apply. The left-hand window is updated.
  3. Click Add Step.
  4. In the Step Name field, type Select Account. From the Action list, select Select Account.
  5. Select the check box next to the Persist Data as Output check box and enter Account in the Action Output field.
  6. Click Apply and then click Add Step.
  7. In the Step Name field, type Query Opportunities.
  8. From the Action list, select Query Opportunities.
  9. Select the check box next to Persist Data as Output and enter Opps in the Action Output field.
  10. Select the check box next to Provide Input and then select Account from the picklist.
  11. Click Apply and then click Add Step.
  12. In the Step Name field enter Display Opportunities and select Display Opportunities from the Action list.
  13. Select the check box next to Provide Input and select Account and Opps from the Action Input list.
  14. Click Apply and then click Save.
  15. Click Save App.

To create a flow to save Opportunities

  1. Click Action Flow and then click Create.
  2. In the Action Name field type Save Opportunities and then click Apply.
  3. Click Add Step and from the Action list choose Save Opportunities.
  4. Into the Step Name field,  enter Save Opportunities  and click Apply.
  5. Click Save.
  6. Click Save App.

The final step is to add the end-user menus.

The workflow to add end-user menus is as follows:

    • You first add a Group and highlight the group to add buttons underneath it.
    • For each group or button, you can change the names of each by overwriting the Default Group or Display Item in the right window.
    • When you add a button, Order is the order in which the buttons will appear on the end user menu.
    • Action Flow is for associating a menu item to the Action Flow that will be executed by the end user.
    • For icons, X-Author uses the standard Microsoft Office icon list which can be found here: Use what is provided in the procedure below or any other icon from the list. You must enter the icon capitalization exactly as it is described in the procedure below.

The steps to add end-user menus are described in detail in the following sections. 

To create User Menus

  1. Click User Menus.
  2. Click Add Group.
  3. In the Name field, enter Opportunities and 1 in the Order field.
  4. Click Add Button and in the Name field enter Retrieve Opportunities.
  5. In the Icon field enter "GetExternalDataFromOtherSources".
  6. Enter 1 in the Order field.
  7. From the Action Flow list, select Retrieve Opportunities.
  8. Click on Opportunities to highlight the group and then click Add Button.
  9. In the Name field, enter Save Opportunities.
  10. In the Icon field, enter SaveObjectAs .
  11. In the Order field, enter 2.
  12. From the Action Flow list, select Save Opportunities.
  13. Click Save
  14. Click Save App.

Improving the appearance of end-user menus

  1. Enlarge the title.
  2. Highlight the row headings.
  3. Identify to the end-user the columns or cells that are modifiable by highlighting them in a different color.
  4. You can delete the text in brackets. This does not remove the fields because those are in the map. This just makes the presentation more pleasing.
    Make sure to place your cursor in the cell and use the Delete key. Do not use row delete!

After you follow all the procedures in this section, a new App with the name Opportunities by Account has been created.