---
id: object/table/5357
type: object
title: Table 5357 "CRM Contract"
summary: Table 5357 "CRM Contract" in Base Application (Microsoft.Integration.D365Sales). 66 fields. Present since at least BC23, still in BC30, changed in BC24, BC28.
tier: official
language: en
tags:
  - table
  - base application
versions:
  introduced: null
  last_changed: "28"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 185ce5f890e52176fab2ba7672eac436124ef8b87d973564c95e44662b3aa219
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Integration/D365Sales/CRMContract.Table.al
    title: src/Layers/W1/BaseApp/Integration/D365Sales/CRMContract.Table.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: table
object_id: 5357
name: CRM Contract
namespace: Microsoft.Integration.D365Sales
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "28"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 66
  procedures: 0
  events: 0
  subscribers: 0
relations:
  out: 33
  referenced_by: 4
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 0
  called_by: 0
  implements: 0
---

# Table 5357 "CRM Contract"

> Table 5357 "CRM Contract" in Base Application (Microsoft.Integration.D365Sales). 66 fields. Present since at least BC23, still in BC30, changed in BC24, BC28.

Base Application · Microsoft.Integration.D365Sales · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Integration/D365Sales/CRMContract.Table.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Caption | CRM Contract |
| TableType | CRM |
| DataClassification | CustomerContent |

## Fields

Explanation: the field's ToolTip in the code; without one, the ToolTip of a page control bound to the field (marked via the page); without that, its Caption (marked caption) when that differs from the name.

| No. | Name | Type | Explanation | Notes |
|---|---|---|---|---|
| 1 | ContractId | Guid | Contract <small>caption</small> |  |
| 2 | OwningBusinessUnit | Guid | Owning Business Unit <small>caption</small> | TableRelation [Table 5364 "CRM Businessunit"](../table/5364.md) ("CRM Businessunit".BusinessUnitId) |
| 3 | ContractServiceLevelCode | Option | Service Level <small>caption</small> | OptionCaption: Gold,Silver,Bronze |
| 4 | ServiceAddress | Guid | Contract Address <small>caption</small> | TableRelation [Table 5360 "CRM Customeraddress"](../table/5360.md) ("CRM Customeraddress".CustomerAddressId) |
| 5 | BillToAddress | Guid | Bill To Address <small>caption</small> | TableRelation [Table 5360 "CRM Customeraddress"](../table/5360.md) ("CRM Customeraddress".CustomerAddressId) |
| 6 | OwningUser | Guid | Owning User <small>caption</small> | TableRelation [Table 5340 "CRM Systemuser"](../table/5340.md) ("CRM Systemuser".SystemUserId) |
| 7 | ContactId | Guid | Contact <small>caption</small> | TableRelation [Table 5342 "CRM Contact"](../table/5342.md) ("CRM Contact".ContactId) |
| 8 | AccountId | Guid | Account <small>caption</small> | TableRelation [Table 5341 "CRM Account"](../table/5341.md) ("CRM Account".AccountId) |
| 9 | BillingAccountId | Guid | Billing Account <small>caption</small> | TableRelation [Table 5341 "CRM Account"](../table/5341.md) ("CRM Account".AccountId) |
| 10 | ContractNumber | Text[100] | Contract ID <small>caption</small> |  |
| 11 | BillingContactId | Guid | Billing Contact <small>caption</small> | TableRelation [Table 5342 "CRM Contact"](../table/5342.md) ("CRM Contact".ContactId) |
| 12 | ActiveOn | Date | Contract Start Date <small>caption</small> |  |
| 13 | ExpiresOn | Date | Contract End Date <small>caption</small> |  |
| 14 | CancelOn | Date | Cancellation Date <small>caption</small> |  |
| 15 | Title | Text[100] | Contract Name <small>caption</small> |  |
| 16 | ContractLanguage | BLOB | Description <small>caption</small> |  |
| 17 | BillingStartOn | Date | Billing Start Date <small>caption</small> |  |
| 18 | EffectivityCalendar | Text[168] | Support Calendar <small>caption</small> |  |
| 19 | BillingEndOn | Date | Billing End Date <small>caption</small> |  |
| 20 | BillingFrequencyCode | Option | Billing Frequency <small>caption</small> | OptionCaption: Monthly,Bimonthly,Quarterly,Semiannually,Annually |
| 21 | CreatedBy | Guid | Created By <small>caption</small> | TableRelation [Table 5340 "CRM Systemuser"](../table/5340.md) ("CRM Systemuser".SystemUserId) |
| 22 | CreatedOn | DateTime | Created On <small>caption</small> |  |
| 23 | ModifiedBy | Guid | Modified By <small>caption</small> | TableRelation [Table 5340 "CRM Systemuser"](../table/5340.md) ("CRM Systemuser".SystemUserId) |
| 24 | AllotmentTypeCode | Option | Allotment Type <small>caption</small> | OptionCaption: ,Number of Cases,Time,Coverage Dates |
| 25 | UseDiscountAsPercentage | Boolean | Discount <small>caption</small> |  |
| 26 | ModifiedOn | DateTime | Modified On <small>caption</small> |  |
| 27 | TotalPrice | Decimal | Total Price <small>caption</small> |  |
| 28 | VersionNumber | BigInteger | Version Number <small>caption</small> |  |
| 29 | TotalDiscount | Decimal | Total Discount <small>caption</small> |  |
| 30 | StateCode | Option | Status <small>caption</small> | OptionCaption: Draft,Invoiced,Active,On Hold,Canceled,Expired |
| 31 | NetPrice | Decimal | Net Price <small>caption</small> |  |
| 32 | StatusCode | Option | Status Reason <small>caption</small> | OptionCaption: ,Draft,Invoiced,Active,On Hold,Canceled,Expired |
| 33 | OriginatingContract | Guid | Originating Contract <small>caption</small> | TableRelation [Table 5357 "CRM Contract"](../table/5357.md) ("CRM Contract".ContractId) |
| 34 | Duration | Integer | — |  |
| 35 | ContactIdName | Text[160] | — | FlowField: lookup("CRM Contact".FullName where(ContactId = field(ContactId))) |
| 36 | AccountIdName | Text[160] | — | FlowField: lookup("CRM Account".Name where(AccountId = field(AccountId))) |
| 37 | BillingContactIdName | Text[160] | — | FlowField: lookup("CRM Contact".FullName where(ContactId = field(BillingContactId))) |
| 38 | BillingAccountIdName | Text[160] | — | FlowField: lookup("CRM Account".Name where(AccountId = field(BillingAccountId))) |
| 39 | OriginatingContractName | Text[100] | — | FlowField: lookup("CRM Contract".Title where(ContractId = field(OriginatingContract))) |
| 40 | BillToAddressName | Text[200] | — | FlowField: lookup("CRM Customeraddress".Name where(CustomerAddressId = field(BillToAddress))) |
| 41 | ServiceAddressName | Text[200] | — | FlowField: lookup("CRM Customeraddress".Name where(CustomerAddressId = field(ServiceAddress))) |
| 42 | ContractTemplateAbbreviation | Text[20] | Template Abbreviation <small>caption</small> |  |
| 43 | CreatedByName | Text[200] | — | FlowField: lookup("CRM Systemuser".FullName where(SystemUserId = field(CreatedBy))) |
| 44 | ModifiedByName | Text[200] | — | FlowField: lookup("CRM Systemuser".FullName where(SystemUserId = field(ModifiedBy))) |
| 45 | CustomerId | Guid | Customer <small>caption</small> | TableRelation [Table 5341 "CRM Account"](../table/5341.md), [Table 5342 "CRM Contact"](../table/5342.md) (if (CustomerIdType = const(account)) "CRM Account".AccountId else if (CustomerIdType = const(contact)) "CRM Contact".ContactId) |
| 46 | CustomerIdType | Option | Customer Type <small>caption</small> | OptionCaption: ,account,contact |
| 47 | BillingCustomerId | Guid | Bill To Customer <small>caption</small> | TableRelation [Table 5341 "CRM Account"](../table/5341.md), [Table 5342 "CRM Contact"](../table/5342.md) (if (BillingCustomerIdType = const(account)) "CRM Account".AccountId else if (BillingCustomerIdType = const(contact)) "CRM Contact".ContactId) |
| 48 | BillingCustomerIdType | Option | Bill To Customer Type <small>caption</small> | OptionCaption: ,account,contact |
| 49 | OwnerId | Guid | Owner <small>caption</small> | TableRelation [Table 5340 "CRM Systemuser"](../table/5340.md), [Table 5359 "CRM Team"](../table/5359.md) (if (OwnerIdType = const(systemuser)) "CRM Systemuser".SystemUserId else if (OwnerIdType = const(team)) "CRM Team".TeamId) |
| 50 | OwnerIdType | Option | — | OptionCaption: ,systemuser,team |
| 51 | TimeZoneRuleVersionNumber | Integer | Time Zone Rule Version Number <small>caption</small> |  |
| 52 | OverriddenCreatedOn | Date | Record Created On <small>caption</small> |  |
| 53 | ImportSequenceNumber | Integer | Import Sequence Number <small>caption</small> |  |
| 54 | UTCConversionTimeZoneCode | Integer | UTC Conversion Time Zone Code <small>caption</small> |  |
| 55 | TransactionCurrencyId | Guid | Currency <small>caption</small> | TableRelation [Table 5345 "CRM Transactioncurrency"](../table/5345.md) ("CRM Transactioncurrency".TransactionCurrencyId) |
| 56 | ExchangeRate | Decimal | Exchange Rate <small>caption</small> |  |
| 57 | TotalDiscount_Base | Decimal | Total Discount (Base) <small>caption</small> |  |
| 58 | NetPrice_Base | Decimal | Net Price (Base) <small>caption</small> |  |
| 59 | TransactionCurrencyIdName | Text[100] | — | FlowField: lookup("CRM Transactioncurrency".CurrencyName where(TransactionCurrencyId = field(TransactionCurrencyId))) |
| 60 | TotalPrice_Base | Decimal | Total Price (Base) <small>caption</small> |  |
| 61 | CreatedOnBehalfBy | Guid | Created By (Delegate) <small>caption</small> | TableRelation [Table 5340 "CRM Systemuser"](../table/5340.md) ("CRM Systemuser".SystemUserId) |
| 62 | CreatedOnBehalfByName | Text[200] | — | FlowField: lookup("CRM Systemuser".FullName where(SystemUserId = field(CreatedOnBehalfBy))) |
| 63 | ModifiedOnBehalfBy | Guid | Modified By (Delegate) <small>caption</small> | TableRelation [Table 5340 "CRM Systemuser"](../table/5340.md) ("CRM Systemuser".SystemUserId) |
| 64 | ModifiedOnBehalfByName | Text[200] | — | FlowField: lookup("CRM Systemuser".FullName where(SystemUserId = field(ModifiedOnBehalfBy))) |
| 65 | OwningTeam | Guid | Owning Team <small>caption</small> | TableRelation [Table 5359 "CRM Team"](../table/5359.md) ("CRM Team".TeamId) |
| 66 | EntityImageId | Guid | Entity Image Id <small>caption</small> |  |

## Keys

- Key1: ContractId (clustered)
- Key2: Title

## Relations

- CreatedByName: CalcFormula [Table 5340 "CRM Systemuser"](../table/5340.md)
- CreatedOnBehalfByName: CalcFormula [Table 5340 "CRM Systemuser"](../table/5340.md)
- ModifiedByName: CalcFormula [Table 5340 "CRM Systemuser"](../table/5340.md)
- ModifiedOnBehalfByName: CalcFormula [Table 5340 "CRM Systemuser"](../table/5340.md)
- CreatedBy: TableRelation [Table 5340 "CRM Systemuser"](../table/5340.md)
- CreatedOnBehalfBy: TableRelation [Table 5340 "CRM Systemuser"](../table/5340.md)
- ModifiedBy: TableRelation [Table 5340 "CRM Systemuser"](../table/5340.md)
- ModifiedOnBehalfBy: TableRelation [Table 5340 "CRM Systemuser"](../table/5340.md)
- OwnerId: TableRelation [Table 5340 "CRM Systemuser"](../table/5340.md) (conditional)
- OwningUser: TableRelation [Table 5340 "CRM Systemuser"](../table/5340.md)
- AccountIdName: CalcFormula [Table 5341 "CRM Account"](../table/5341.md)
- BillingAccountIdName: CalcFormula [Table 5341 "CRM Account"](../table/5341.md)
- AccountId: TableRelation [Table 5341 "CRM Account"](../table/5341.md)
- BillingAccountId: TableRelation [Table 5341 "CRM Account"](../table/5341.md)
- BillingCustomerId: TableRelation [Table 5341 "CRM Account"](../table/5341.md) (conditional)
- CustomerId: TableRelation [Table 5341 "CRM Account"](../table/5341.md) (conditional)
- BillingContactIdName: CalcFormula [Table 5342 "CRM Contact"](../table/5342.md)
- ContactIdName: CalcFormula [Table 5342 "CRM Contact"](../table/5342.md)
- BillingContactId: TableRelation [Table 5342 "CRM Contact"](../table/5342.md)
- BillingCustomerId: TableRelation [Table 5342 "CRM Contact"](../table/5342.md) (conditional)
- ContactId: TableRelation [Table 5342 "CRM Contact"](../table/5342.md)
- CustomerId: TableRelation [Table 5342 "CRM Contact"](../table/5342.md) (conditional)
- TransactionCurrencyIdName: CalcFormula [Table 5345 "CRM Transactioncurrency"](../table/5345.md)
- TransactionCurrencyId: TableRelation [Table 5345 "CRM Transactioncurrency"](../table/5345.md)
- OriginatingContractName: CalcFormula [Table 5357 "CRM Contract"](../table/5357.md)
- OriginatingContract: TableRelation [Table 5357 "CRM Contract"](../table/5357.md)
- OwnerId: TableRelation [Table 5359 "CRM Team"](../table/5359.md) (conditional)
- OwningTeam: TableRelation [Table 5359 "CRM Team"](../table/5359.md)
- BillToAddressName: CalcFormula [Table 5360 "CRM Customeraddress"](../table/5360.md)
- ServiceAddressName: CalcFormula [Table 5360 "CRM Customeraddress"](../table/5360.md)
- BillToAddress: TableRelation [Table 5360 "CRM Customeraddress"](../table/5360.md)
- ServiceAddress: TableRelation [Table 5360 "CRM Customeraddress"](../table/5360.md)
- OwningBusinessUnit: TableRelation [Table 5364 "CRM Businessunit"](../table/5364.md)

## Referenced by

4 fields in 2 objects relate to this table (TableRelation or CalcFormula).

- [Table 5349 "CRM Incident"](../table/5349.md): ContractIdName, ContractId
- [Table 5357 "CRM Contract"](../table/5357.md): OriginatingContractName, OriginatingContract

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24, BC28

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "table", object_name: "CRM Contract")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
