Map the entity and array extensions in ContactManager

After creating new ABContact entities and array extensions, you need to map them from ContactManager to any core applications that support them.

Before you begin

Complete Add the new array to the ABContact entity.

About this task

In this topic, you add the new array reference and the entity it references to the ContactMapper class in ContactManager. For more information on this class, see ContactMapper class.

Procedure

  1. In Guidewire Studio™ for ContactManager, press Ctrl+N and search for the ContactMapper class.
  2. Double-click the ab1000 version of the class in the search results to open it in the editor.
  3. Find the Mappings method, which has the following declaration:
    override property get Mappings() : Set<PropertyMapping>
  4. At the end of the method, add a comma to the last line of code so you can add more code. For example:
    fieldMapping(ABContactCategoryScore#Score),
  5. After this last line of code, add an arrayMapping method for ABContact#ContactServiceArea, preceded with a comment for this part of the Mappings method:
    //ContactServiceState mapping
    arrayMapping(ABContact#ContactServiceArea),
  6. Add fieldMapping methods for the elements of the ContactServiceState entity, which the ABContact array reference refers to:
    fieldMapping(ContactServiceState#LinkID).withMappingDirection(TO_XML),
    fieldMapping(ContactServiceState#External_PublicID),
    fieldMapping(ContactServiceState#External_UniqueID),
    fieldMapping(ContactServiceState#ServiceState)

What to do next

Add support for service states to the ContactManager user interface