---
id: object/table/175
type: object
title: Table 175 "Standard Vendor Purchase Code"
summary: Table 175 "Standard Vendor Purchase Code" in Base Application (Microsoft.Purchases.Document). 8 fields, 8 public procedures, 8 events. Present since at least BC23, still in BC30, changed in BC24-25, BC27-28.
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: 1b8190fb1eb954688d76cae8caf1cbe0ef64cb7e549b67d3b1d93aed2f15265f
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Purchases/Document/StandardVendorPurchaseCode.Table.al
    title: src/Layers/W1/BaseApp/Purchases/Document/StandardVendorPurchaseCode.Table.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn:
    - https://learn.microsoft.com/dynamics365/business-central/purchasing-setup-purchasing
  objects: []
  features: []
  topics:
    - topic/business-central/business-functionality/set-up-business-central/set-up-purchase
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: table
object_id: 175
name: Standard Vendor Purchase Code
namespace: Microsoft.Purchases.Document
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "25"
  - "27"
  - "28"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 8
  procedures: 17
  events: 8
  subscribers: 0
relations:
  out: 3
  referenced_by: 0
  pages: 1
  extended_by: 0
  event_subscribers: 0
  calls: 2
  called_by: 0
  implements: 0
---

# Table 175 "Standard Vendor Purchase Code"

> Table 175 "Standard Vendor Purchase Code" in Base Application (Microsoft.Purchases.Document). 8 fields, 8 public procedures, 8 events. Present since at least BC23, still in BC30, changed in BC24-25, BC27-28.

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

Learn documents this table through its pages: [Page 178 "Standard Vendor Purchase Codes"](../page/178.md) (1 Learn page).

## Properties

| Property | Value |
|---|---|
| Caption | Standard Vendor Purchase Code |
| 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 | Vendor No. | Code[20] | Specifies the number of the vendor to which the standard purchase code is assigned. | TableRelation [Table 23 "Vendor"](../table/23.md); NotBlank |
| 2 | Code | Code[10] | Specifies a standard purchase code from the Standard Purchase Code table. | TableRelation [Table 173 "Standard Purchase Code"](../table/173.md) (Standard Purchase Code); NotBlank |
| 3 | Description | Text[100] | Specifies a description of the standard purchase code. |  |
| 13 | Currency Code | Code[10] | — | TableRelation [Table 4 "Currency"](../table/4.md); not editable |
| 15 | Insert Rec. Lines On Quotes | Option | Specifies how you want to use standard purchase codes on purchase quotes. | OptionCaption: Manual,Automatic,Always Ask; DataClassification SystemMetadata |
| 16 | Insert Rec. Lines On Orders | Option | Specifies how you want to use standard purchase codes on purchase orders. | OptionCaption: Manual,Automatic,Always Ask; DataClassification SystemMetadata |
| 17 | Insert Rec. Lines On Invoices | Option | Specifies how you want to use standard purchase codes on purchase invoices. | OptionCaption: Manual,Automatic,Always Ask; DataClassification SystemMetadata |
| 18 | Insert Rec. Lines On Cr. Memos | Option | Specifies how you want to use standard purchase codes on purchase credit memos. | OptionCaption: Manual,Automatic,Always Ask; DataClassification SystemMetadata |

## Keys

- Key1: Vendor No., Code (clustered)
- Key2: Code, Currency Code

## Events published

- `OnBeforeApplyStdCodesToPurchaseLines(var PurchLine: Record "Purchase Line"; StdPurchLine: Record "Standard Purchase Line")` (integration)
- `OnAfterCombineDimensions(var PurchaseLine: Record "Purchase Line"; StdPurchaseLine: Record "Standard Purchase Line")` (integration)
- `OnAfterApplyStdCodesToPurchaseLines(var StandardVendorPurchaseCode: Record "Standard Vendor Purchase Code"; var StandardPurchaseLine: Record "Standard Purchase Line"; var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; StandardPurchaseCode: Record "Standard Purchase Code")` (integration)
- `OnApplyStdCodesToPurchaseLinesOnBeforeStdPurchLineFind(var StandardVendorPurchaseCode: Record "Standard Vendor Purchase Code"; var StandardPurchaseLine: Record "Standard Purchase Line"; var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header"; StandardPurchaseCode: Record "Standard Purchase Code")` (integration)
- `OnApplyStdCodesToPurchaseLinesOnLoopStdPurchLine(var StandardVendorPurchaseCode: Record "Standard Vendor Purchase Code"; var StandardPurchaseLine: Record "Standard Purchase Line"; var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; var StandardPurchaseCode: Record "Standard Purchase Code"; var IsHandled: Boolean)` (integration)
- `OnApplyStdCodesToPurchaseLinesOnAfterPurchLineInsert(var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; var StandardPurchaseLine: Record "Standard Purchase Line")` (integration)
- `OnInsertPurchLinesOnBeforeApplyStdVendPurchCodes(var StandardVendorPurchaseCode: Record "Standard Vendor Purchase Code"; var IsHandled: Boolean; var PurchaseHeader: Record "Purchase Header")` (integration)
- `OnAfterSetFilterByAutomaticAndAlwaysAskCodes(var StandardVendorPurchaseCode: Record "Standard Vendor Purchase Code"; var PurchaseHeader: Record "Purchase Header")` (integration)

## Procedures

- `InsertPurchLines(PurchHeader: Record "Purchase Header")`
- `ApplyStdCodesToPurchaseLines(PurchHeader: Record "Purchase Header"; StdVendPurchCode: Record "Standard Vendor Purchase Code")`
- `InsertExtendedText(PurchLine: Record "Purchase Line")`
- `InsertExtendedText(PurchLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header")`
- `GetNextLineNo(PurchLine: Record "Purchase Line"): Integer`
- `SetFilterByAutomaticAndAlwaysAskCodes(PurchaseHeader: Record "Purchase Header")`
- `IsInsertRecurringLinesOnDocumentAutomatic(PurchaseHeader: Record "Purchase Header"): Boolean`
- `ShouldAutoInsertRecurringLinesOnDocument(PurchaseHeader: Record "Purchase Header"): Boolean`

Plus 1 local procedures.

## Triggers

OnRename

## Relations

- Code: TableRelation [Table 173 "Standard Purchase Code"](../table/173.md)
- Vendor No.: TableRelation [Table 23 "Vendor"](../table/23.md)
- Currency Code: TableRelation [Table 4 "Currency"](../table/4.md)

## Pages and codeunits on this table

- [Page 178 "Standard Vendor Purchase Codes"](../page/178.md) (source table)

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 378 "Transfer Extended Text"](../codeunit/378.md) (2 calls: `InsertExtendedText → InsertPurchExtText`, `InsertExtendedText → PurchCheckIfAnyExtText`)
- [Codeunit 408 "DimensionManagement"](../codeunit/408.md) (1 call: `CombineDimensions → GetCombinedDimensionSetID`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24-25, BC27-28

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). The call sections above are our own, per object, from the BC29 call graph. 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: "Standard Vendor Purchase Code")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
