def record_prefix(required_type, factory):
    """
    Creates a record prefix for the specified record type.

    :param required_type: the type of the record using this prefix
    :param factory: field factory
    :return: the record prefix
    """
    field = record_type(required_type)
    field += factory.get_rule('transaction_sequence_n')
    field += factory.get_rule('record_sequence_n')

    # field.leaveWhitespace()

    return field