Add ServiceState search support in ContactManager for core applications

To support searching for contacts by the ServiceState property extension, add it to the ContactManager web API that core applications use for contact search.

Before you begin

Complete Enable ServiceState support for the ContactManager search screens. Also, it might be useful to review the information on the web API class ABContactAPISearchCriteria in Overview of adding search capability in ContactManager.

About this task

In this step of the search example, you add code for the ServiceState field to the Gosu class ABContactAPISearchCriteria. This web API class enables a Guidewire core application’s Search screen to show the field to the user and pass its value to ContactManager.

Procedure

  1. In Guidewire Studio for ContactManager, navigate in the Project window to configuration > gsrc and then to gw.webservice.ab.ab1000.abcontactapi.
  2. Double-click ABContactAPISearchCriteria to open it in the editor.
  3. Add the following variable definition to the list of variables at the beginning of the class:
    public var ServiceState : typekey.State
  4. In the method toSearchCriteria, add a comma after the line starting with :AllTagsRequired and add a new entry for ServiceState:
    :AllTagsRequired = this.AllTagsRequired,
    :ServiceState = this.ServiceState

What to do next

Configure ContactManager search screens for ServiceState