Show TOC

Creating and Working with Contact TemplateLocate this document in the navigation structure

This section will guide you to create a template for the Microsoft Outlook item, Contacts, and to work with it in Microsoft Outlook.

Prerequisites

Make sure that you have the URL of the OData service you want to use, and you have permissions in the SAP Gateway system to access the service.

Context

Example

We used an example in this section based on an OData service called Contact, shipped with Enterprise Procurement Model (EPM). SAP ships EPM with SAP Gateway for demo purposes.

The service, Contact, is provided by SAP, and your SAP administrator may be using the same name at the time of service activation, however, the name may vary in your SAP Gateway system.

Contact the SAP administrator to activate the service and get the exact service name. You can also select any OData feed which can be modeled as a Microsoft Outlook Contact entity.

To create the Contacts template, proceed as follows:

Procedure

  1. Choose the GWM Outlook 2010 Add-in or GWM Outlook 2013 Add-in from New Project in the Starter page.
  2. Select the Microsoft Outlook item, Contacts, in the Select Template list, and enter a name for the template.
  3. Choose Next, and enter the URL for the service to access the contact service, or click Browse to connect to the SAP Gateway system.
  4. Choose Next, and select the collection you want, for example, BusinessPartnerCollection in the Service Collection list.
  5. Map the properties of the collection to the properties of the Microsoft Outlook item, Contacts.
    Drag and drop the service collection properties to the suitable Outlook fields. The following mappings are applicable for the Contact service.
    User Properties Outlook Properties
    Company Name FirstName
    Web Address WebPage
    Email Address Email1Address
    Telephone Number BusinessTelephoneNumber
    Note The mapping can vary, if you choose a different service to create the template for GWM Outlook add-in. The mapping ensures that the data from the OData service is available in Microsoft Outlook standard UI.
  6. Choose Next; the Additional Properties page displays.
    In the Additional Properties page, you can add further customization, and view the associations defined in the service for navigation options.
  7. Click Next; the Project Summary page displays.
  8. Choose Generate Project.
    Note To run the project locally in Microsoft Outlook, build and run the project in Microsoft Visual Studio. The Microsoft Outlook opens, and the GWM add-in is now available on the menu bar. The template with data type mismatch is not displayed in Microsoft Outlook.
    The GWM Outlook add-in for Contacts is created.

    To deploy the add-in in another machine, you have to package the template as detailed in the Creating an Installer for a GWM Visual Studio Add-In section.

Working with the Contact Template in Microsoft Outlook

Context

When you choose to work with the Contacts folder in Microsoft Outlook, you can create add-ins for business representations that are best suited to be represented as a Contacts, for example, CRM Contact, Account, ERP Employees, Business Partner, and many more.

To run the deployed add-in, from the Microsoft Outlook ribbon, choose the add-in name in the menu (as created in Microsoft Visual Studio).
Note You can change the add-in name at any point in the generated code in Microsoft Visual Studio.

Procedure

  1. Click the (your add-in name in the menu) GWM Outlook add-in to display the new template.
  2. Click Start of the navigation path GetAll Next navigation step Contacts  End of the navigation path to retrieve all the contacts from the SAP backend system.
    The icon, GetAll is a functionality that is available for all template(s) created in the project.
    The contacts data is retrieved and displayed in the details region of Microsoft Outlook under My Contacts. If the project was created with the selected option, Create in new folder flag, then a new folder is created with the add-in template name.
  3. You can do the following:
    1. To open a contact, double click on it.
    2. Edit the data and click the Save button to save the changes to the contact in the backend system, and close it, only if the OData service has (CUD functionality) editing capabilities.
  4. Click on the New Item button on the toolbar to create a new contact. This is the New Items label you specified when creating the project.
    The create contact window appears.
  5. After entering the details for new contact, click Save & Close to save the new contact to the SAP backend system.