Get started > Use case scenarios - customizing with business rules > Creating a record from a record: How to add a new field

Creating a record from a record: How to add a new field

The following use case scenario demonstrates how, after you add a field (in this case, Secondary contact) to the Request record type, you can configure the Incident record type such that when an incident is created from a request, it also receives the secondary contact information.

  1. In the Request record type:

    1. Add a field, Secondary contact. For more information, see How to create a field and add it to a record type.
    2. Add the field to the Request record type's withoutResolution and New Request form forms. For more information, see How to edit a form.
  2. In the Incident record type:

    1. Add the same field as you added to the Request record type.
    2. Add the field to the Full Incident form form.
    3. Add a global business rule as follows:

      Description: If the incident is created from a request, copy the request's Secondary contact to the incident record.

      Process event Rule type Rule template
      After adding relationship If...Then Actions > Set field

      Set parameters:

      Parameter Value
      expression ${entity.SecondaryContact_c == null && entity.IncidentCausedByRequest != null && entity.IncidentCausedByRequest.count == 1}
      field Secondary contact
      value ${entity.IncidentCausedByRequest.SecondaryContact_c}

      The rule should appear as follows:

  

Result

When a request is opened, the agent fills in the secondary contact, and then creates an incident record from the request.

The request's secondary contact information is automatically mapped to the incident record.