---
schema_version: "1"
id: 5b293e462f839266076b9eb82790c1495ffec0b19c93353a498af0293098094e
title: Territory2AlignmentLog
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_territory2alignmentlog.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_territory2alignmentlog.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: bb8cff78cd4564249c8d8946e7ae3eeaa41e9ea224719112cde502719a302097
description: Represents the start and end status of a territory assignment rule run job. This object is available in API version 54.0 and later.
---
# Territory2AlignmentLog

Represents the start and end status of a territory assignment rule run job. This object is available in API version 54.0 and later.

## Supported Calls

describeSObjects(), getDeleted(), getUpdated(), query(), retrieve()

## Special Access Rules

Available if Sales Territories has been enabled.

Standard and partner users can access this object. If a territory model is in Active state, any standard or partner user can view that model, including its territories and assignment rules. For territories in an active model, any standard or partner user can view assigned records and assigned users subject to your Salesforce sharing settings. Users can’t view territory models in other states (such as Planning or Archived).

## Fields

| Field | Details |
| --- | --- |
| EndTime | 
Type

dateTime

Properties

Filter, Nillable, Sort

Description

The date and time when the assignment rule run job finished.



 |
| Filter | 

Type

textarea

Properties

Nillable

Description

Criteria to filter the rule jobs. For example, {RULE\_LAST\_MOD\_DATE\_FORM=2021-08-31, RULE\_LAST\_MOD\_DATE\_TO=2021-09-15}.



 |
| RunAsId | 

Type

reference

Properties

Filter, Group, Nillable, Sort

Description

ID of the Salesforce user who started the assignment rule run job.

This is a relationship field.

Relationship Name

RunAs

Relationship Type

Lookup

Refers To

User



 |
| StartTime | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The date and time when the user started the assignment rule run job.



 |
| Status | 

Type

picklist

Properties

Filter, Group, Restricted picklist, Sort

Description

The status of the assignment rule run job.



 |
| Territory2Id | 

Type

reference

Properties

Filter, Group, Nillable, Sort

Description

The ID of the territory for which the assignment rule run was performed. If the assignment rule run was for the territory model, this value is null.

This is a relationship field.

Relationship Name

Territory2

Relationship Type

Lookup

Refers To

Territory2



 |
| Territory2ModelId | 

Type

reference

Properties

Filter, Group, Sort

Description

The ID of the territory model for which the assignment rule run was performed.

This is a relationship field.

Relationship Name

Territory2Model

Relationship Type

Lookup

Refers To

Territory2Model



 |

## Associated Objects

This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object. Otherwise, they’re available in the specified API version and later.

[Territory2AlignmentLogChangeEvent](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_change_event.htm "A ChangeEvent object is available for each object that supports Change Data Capture. You can subscribe to a stream of change events using Change Data Capture to receive data tied to record changes in Salesforce. Changes include record creation, updates to an existing record, deletion of a record, and undeletion of a record. A change event isn’t a Salesforce object—it doesn’t support CRUD operations or queries. It’s included in the object reference so you can discover which Salesforce objects support change events.")

Change events are available for the object.