App Objectives

  1. The end-user invokes all opportunities, for which they are an owner, from your environment into Excel.
  2. For each Opportunity include: Name, Amount, Close Date, Stage, and Owner Id.
  3. Allow the end-user to save modifications to only the Amount and Stage for each Opportunity.


App Components

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

Creating the Opportunity Forecast Application

Application creation is a multi-step process, starting with naming the app and ending with the creation of your end-user menus. The steps are:

  1. Create a new App.
  2. Select Objects to use in the app.
  3. Create a Display and Save Maps.
  4. Create Query, Display, and Save actions.
  5. Create and Action Flow.
  6. Create end-user menus.

The steps are described in detail in the following sections. You will complete each step as you build your Opportunity Forecast app.


You must be connected (through the X-Author Designer) to an environment instance that is enabled for X-Author for Excel. 

To create the Opportunity Forecast App 

  1. In the ribbon menu, click Apps and select New App.
  2. In the App Name Field, type Opportunity Forecast  and in the Select Template section, click the New radio button.
  3. Click Create.
  4. Select edition. For example, Enterprise.

To select Objects

  1. In the ribbon menu, click Objects.
  2. In the Objects list, locate Opportunity, either by scrolling or by typing in the first letter to jump to the nearest match and then scrolling.
  3. Click Add Parent Object. This will always be true if you have just one object. The object is now in the selected box on the right and is automatically assigned default List behavior.
  4. In Add Fields below, select the following field names: Account IDAmountClose DateNameOwner ID, and Stage.
  5. Click Apply.
    Note: You must click Apply after you have selected the fields for any object or these will not be saved if you have more than one object.
  6. Click Save and Close.
  7. Click Save App.

To create a Display Map 

  1. Click Display Map and select Create.
  2. In the Name field, type Main and from the Type drop-down, select List.
  3. Drag the Account Name field to A7. This field was not an available in Objects, but X-Author for Excel automatically includes the Name field for any lookup field selected in Objects.
  4. Drag Name to B7, Amount to C7, Close Date to D7, Stage to F7, Opportunity Id to H7.
  5. Click Options and change the Sort by list to Account Name.
  6. To save the Display Map, click Save and then click Close.
  7. Add a title in A1, for example, Opportunities Forecast.
  8. Save the App.

To create a Save Map

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

To create a Search and Select Action

  1. Click the arrow under Actions on the menu and select Search and Select.
  2. Enter Select Account into the Action Name field.
  3. Choose Account from the Objects list.
  4. Click the check box next to Name in the Search window.
  5. Click the check box next to Name in Fields to Display in Search Results and the Sort check box to the right.
  6. Choose Single from the Results area.
  7. Click Save.
  8. Click Save App.

To create a Query Action

  1. Under Actions, click the arrow and select Query.
  2. In the Action Name field, type Query Opportunities and from the Object picklist select Opportunity.
  3. In the Filters section, select or enter the following to restrict the Opportunity records to those for which the current user is the Opportunity owner. Click the lookup icon and select the Owner Id field. Because this is a lookup field, click to the right of the orange field to select the row and click Apply. Select the other parameters based on the table below.

    Salesforce Object and FieldValue TypeOperatorValue List
    Owner IdSystemVariablesEqualsCurrentUser
  4. Click Save.
  5. Click Save App.

To create a Display Action

  1. Click the arrow under Actions and select Display.
  2. Enter Display Opportunities into the Action Name field.
  3. Choose Main from the Display Map list.

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. Enter Save Opportunities into the Action Name field.
  3. Select Main from the Save Map list.
  4. Click Save.
  5. Click Save App.

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. In the Action Flow Name field, type Retrieve Opportunities and click Apply. The left-hand window is updated.
  3. Click Add Step.
  4. In the Step Name field, type Query Opportunities.
  5. From the Action list, select Query Opportunities.
  6. Check Persist Data as Output.
  7. Enter Opps, then click Apply.
  8. Click Add Step.
  9. In the Step Name, enter Display Opportunities.
  10. From the Action list, select Display Opportunities.
  11. Check Provide Input and choose Opps as default.
  12. Click Apply and then click Save.
  13. Click Save App.

To create an action flow to save Opportunities

  1. Click Action Flow and then click Create.
  2. In the Action Flow Name field, enter Save Opportunities and click Apply. The left hand window is updated.
  3. Click Add Step and in the Step Name field, enter Save.
  4. From the Action list, select Save Opportunities.
  5. Click Apply.
  6. Click Save.
  7. Click Save App.

The final step is to add the end-user menus. Creating menus is a multi-step process. 

  • 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 button 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 the icons described in the procedure below or use any other icon from the list. You must enter the icon name, including capitalization, exactly as it is documented in the procedure below.

The steps 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, type Opportunities and 1 in the Order field.
  4. Click Add, and in the Name field, type Retrieve Opportunities.
  5. In the Icon field, type "GetExternalDataFromOtherSources" and in the Order field enter 1.
  6. Select Retrieve Opportunities from the Action Flow list.
  7. Click on Opportunities to highlight the group and then click Add Button.
  8. In the Name field, type Save Opportunities.
  9. In the Icon field, type "SaveObjectAs" and in the Order field enter 2.
  10. From the Action Flow list, select Save Opportunities.
  11. Click Save.
  12. Click Save App.

To make the end-user menus look presentable

  1. Enlarge the title.
  2. Highlight the row headings.
  3. Identify to the end-user the columns that are modifiable by highlighting them in a different color.
  4. (Optional) 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 Delete Row.

An App with the name Opportunities Forecast has been created. Now you can run it by clicking the Preview button in the ribbon menu.

The user menus you created now appear in the ribbon. Click the Retrieve Opportunities button and the list of opportunities is displayed. Make a few changes. Click Save Opportunities, and you will see a message that the records were saved. The changes are reflected in your environment.