Define the field as syncable on the account contact role

Complete the step Defining field as syncable on the policy contact role before you perform this step.

Add the new field to the gw.account.AccountContactRoleToPolicyContactRoleSyncedField class. Define the new field as revisioned and syncable on the account.

In the following illustration, the circled number 4 shows the AuditLicenseNumber variable definition as a synchronized field.



The AccountContactRoleToPolicyContactRoleSyncedField constructor assumes that the field name is appended by Internal. If the field name is appended by Internal, copy one of the existing the variable definitions and modify it for the new field. For example, you can copy and modify RelationshipTitle.

If the field name is appended by Internal and an extension, Internal_Ext for example, copy one of the existing the variable definitions and modify it for the new field. Then add a second parameter for the name of the field on the policy location. In addition, define a constructor with arguments for the accountEntityFieldName method.

The instructions describe how to define the field if it is appended by Internal_Ext.

Define revisioned field appended with Internal_Ext

Procedure

  1. In Studio, open gw.account.AccountContactRoleToPolicyContactRoleSyncedField.gs.
  2. Define a constructor for accountEntityFieldName with the following arguments:
    class AccountContactRoleToPolicyContactRoleSyncedField<S extends PolicyContactRole, T> 
        extends AbstractPolicyContactRoleSyncedField<String> {
        ...
      construct(accountEntityFieldNameArg : String, policyEntityFieldNameArg : String) {
        super(accountEntityFieldNameArg, policyEntityFieldNameArg, accountEntityFieldNameArg + "_Ext",
              accountEntityFieldNameArg + "IsNull_Ext", PendingAccountContactRoleUpdate)
      }
        ...

    The last two parameters are for future dated policy changes to the contact name. These changes will be applied to the account at that future date.

  3. Add the AuditLicenseNumber field to the class:
        public static final var AuditLicenseNumber : 
          AccountContactRoleToPolicyContactRoleSyncedField<PolicyAuditContact_Ext, String> = 
              new AccountContactRoleToPolicyContactRoleSyncedField<PolicyAuditContact_Ext, String> 
                    ("AuditLicenseNumber", "AuditLicenseNumberInternal_Ext") 

What to do next

Extend entity and Gosu class for future-date policy changes