---
id: object/codeunit/46
type: object
title: Codeunit 46 "SelectionFilterManagement"
summary: Codeunit 46 "SelectionFilterManagement" in Base Application (System.Text). 48 public procedures. Present since at least BC23, still in BC30, changed in BC24-25, BC28.
tier: official
language: en
tags:
  - codeunit
  - 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: b78f2077a1ae2027771d3b2992d8275f8828f2571f2e05b9765ff01b3e318aa5
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/System/SelectionFilterManagement.Codeunit.al
    title: src/Layers/W1/BaseApp/System/SelectionFilterManagement.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations:
    - localization/be
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 46
name: SelectionFilterManagement
namespace: System.Text
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"
  - "28"
source_major: "29"
obsolete: null
countries:
  - be
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 52
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 0
  called_by: 70
  implements: 0
---

# Codeunit 46 "SelectionFilterManagement"

> Codeunit 46 "SelectionFilterManagement" in Base Application (System.Text). 48 public procedures. Present since at least BC23, still in BC30, changed in BC24-25, BC28.

Base Application · System.Text · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/System/SelectionFilterManagement.Codeunit.al) · facts from BC29

## Procedures

- `GetSelectionFilter(var TempRecRef: RecordRef; SelectionFieldID: Integer): Text`: Get a filter for the selected field from a provided record. Ranges will be used inside the filter were possible.
- `CreateFilterFromTempTable(var SourceTempRecRef: RecordRef; var RecRef: RecordRef; SelectionFieldID: Integer): Text`
- `AddQuotes(inString: Text): Text`
- `ReplaceString(String: Text; FindWhat: Text; ReplaceWith: Text): Text`
- `GetSelectionFilterForItem(var Item: Record Item): Text`
- `GetSelectionFilterForDimensionValue(var DimVal: Record "Dimension Value"): Text`
- `GetSelectionFilterForCurrency(var Currency: Record Currency): Text`
- `GetSelectionFilterForCustomerPriceGroup(var CustomerPriceGroup: Record "Customer Price Group"): Text`
- `GetSelectionFilterForLocation(var Location: Record Location): Text`
- `GetSelectionFilterForGLAccount(var GLAccount: Record "G/L Account"): Text`
- `GetSelectionFilterForGLAccountCategory(var GLAccountCategory: Record "G/L Account Category"): Text`
- `GetSelectionFilterForCustomer(var Customer: Record Customer): Text`
- `GetSelectionFilterForContact(var Contact: Record Contact): Text`
- `GetSelectionFilterForVendor(var Vendor: Record Vendor): Text`
- `GetSelectionFilterForResource(var Resource: Record Resource): Text`
- `GetSelectionFilterForInventoryPostingGroup(var InventoryPostingGroup: Record "Inventory Posting Group"): Text`
- `GetSelectionFilterForGLBudgetName(var GLBudgetName: Record "G/L Budget Name"): Text`
- `GetSelectionFilterForBusinessUnit(var BusinessUnit: Record "Business Unit"): Text`
- `GetSelectionFilterForICPartner(var ICPartner: Record "IC Partner"): Text`
- `GetSelectionFilterForCashFlow(var CashFlowForecast: Record "Cash Flow Forecast"): Text`
- `GetSelectionFilterForCashFlowAccount(var CashFlowAccount: Record "Cash Flow Account"): Text`
- `GetSelectionFilterForCostBudgetName(var CostBudgetName: Record "Cost Budget Name"): Text`
- `GetSelectionFilterForCostCenter(var CostCenter: Record "Cost Center"): Text`
- `GetSelectionFilterForCostObject(var CostObject: Record "Cost Object"): Text`
- `GetSelectionFilterForCostType(var CostType: Record "Cost Type"): Text`
- `GetSelectionFilterForCampaign(var Campaign: Record Campaign): Text`
- `GetSelectionFilterForEmployee(var Employee: Record Employee): Text`
- `GetSelectionFilterForLotNoInformation(var LotNoInformation: Record "Lot No. Information"): Text`
- `GetSelectionFilterForPackageNoInformation(var PackageNoInformation: Record "Package No. Information"): Text`
- `GetSelectionFilterForSerialNoInformation(var SerialNoInformation: Record "Serial No. Information"): Text`
- `GetSelectionFilterForCustomerDiscountGroup(var CustomerDiscountGroup: Record "Customer Discount Group"): Text`
- `GetSelectionFilterForItemDiscountGroup(var ItemDiscountGroup: Record "Item Discount Group"): Text`
- `GetSelectionFilterForItemCategory(var ItemCategory: Record "Item Category"): Text`
- `GetSelectionFilterForIssueReminder(var ReminderHeader: Record "Reminder Header"): Text`
- `GetSelectionFilterForWorkflowStepInstance(var WorkflowStepInstance: Record "Workflow Step Instance"): Text`
- `GetSelectionFilterForWorkflowBuffer(var TempWorkflowBuffer: Record "Workflow Buffer" temporary): Text`
- `GetSelectionFilterForResponsibilityCenter(var ResponsibilityCenter: Record "Responsibility Center"): Text`
- `GetSelectionFilterForSalesPersonPurchaser(var SalespersonPurchaser: Record "Salesperson/Purchaser"): Text`
- `GetSelectionFilterForItemVariant(var ItemVariant: Record "Item Variant"): Text`
- `GetSelectionFilterForFixedAsset(var FixedAsset: Record "Fixed Asset"): Text`
- `GetSelectionFilterForSalesHeader(var SalesHeader: Record "Sales Header"): Text`
- `GetSelectionFilterForPurchaseHeader(var PurchaseHeader: Record "Purchase Header"): Text`
- `GetSelectionFilterForTransferHeader(var TransferHeader: Record "Transfer Header"): Text`
- `GetSelectionFilterForAggregatePermissionSetRoleId(var AggregatePermissionSet: Record "Aggregate Permission Set"): Text`
- `GetSelectionFilterForJob(var Job: Record Job): Text`
- `GetSelectionFilterForJobTask(var JobTask: Record "Job Task"): Text`
- `GetSelectionFilter(var SourceRecRef: RecordRef; SelectionFieldID: Integer; ComputeRangesUsingRecords: Boolean): Text`: Get a filter for the selected field from a provided record. Ranges will be used inside the filter were possible. The values in the selected field must be unique and sorted in ascending order.
- `GetMaximumNumberOfParametersInSQLQuery(): Integer`

Plus 4 local procedures.

## Triggers

OnRun

## Called by

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 8800 "Custom Layout Reporting"](../codeunit/8800.md) (4 calls: `ExcludeReportedObjects → AddQuotes`, `ExcludeReportedObjects → GetMaximumNumberOfParametersInSQLQuery`, `GetCustomerFilter → GetSelectionFilter`, …)
- [Codeunit 6465 "Serv. Selection Filter Mgt."](../codeunit/6465.md) (2 calls: `GetSelectionFilterForServiceHeader → GetSelectionFilter`, `GetSelectionFilterForServiceItem → GetSelectionFilter`)
- [Codeunit 99000813 "Carry Out Action"](../codeunit/99000813.md) (2 calls: `PrintMultiplePurchaseOrders → CreateFilterFromTempTable`, `PrintTransferOrders → CreateFilterFromTempTable`)
- [Table 5801 "Cost Adj. Item Bucket"](../table/5801.md) (2 calls: `AddItemsToBucket → GetSelectionFilterForItem`, `AddMissingItems → GetSelectionFilterForItem`)
- [Codeunit 1002 "Job Create-Invoice"](../codeunit/1002.md) (1 call: `SalesInvoiceExistForMultipleCustomerBillingMethod → GetSelectionFilter`)
- [Codeunit 104070 "Upgrade Refs To Rem. Tables"](../codeunit/104070.md) (1 call: `GetRemovedTablesFilter → GetSelectionFilter`)
- [Codeunit 1311 "Activities Mgt."](../codeunit/1311.md) (1 call: `CreateFilterForGLAccounts → AddQuotes`)
- [Codeunit 2580 "Dimension Correction Mgt"](../codeunit/2580.md) (1 call: `TransferSelectionFilterToRecordRef → GetSelectionFilter`)
- [Codeunit 5520 "Get Unplanned Demand"](../codeunit/5520.md) (1 call: `CreateItemFilter → AddQuotes`)
- [Codeunit 571 "Categ. Generate Acc. Schedules"](../codeunit/571.md) (1 call: `GetIncomeStmtAccFilter → GetSelectionFilterForGLAccount`)
- [Codeunit 5751 "Get Source Doc. Inbound"](../codeunit/5751.md) (1 call: `GenerateLocationCodeFilter → AddQuotes`)
- [Codeunit 5752 "Get Source Doc. Outbound"](../codeunit/5752.md) (1 call: `GenerateLocationCodeFilter → AddQuotes`)
- [Codeunit 5809 "Cost Adj. Session Scheduler"](../codeunit/5809.md) (1 call: `Reschedule → GetSelectionFilterForItem`)
- [Codeunit 5826 "Matched Order Line Mgmt."](../codeunit/5826.md) (1 call: `ShowItemTrackingEntriesForPurchaseInvoice → GetSelectionFilter`)
- [Codeunit 703 "Find Record Management"](../codeunit/703.md) (1 call: `UpdateResultFilter → AddQuotes`)
- [Codeunit 7291 "Search Items With Filters Func"](../codeunit/7291.md) (1 call: `Execute → GetSelectionFilterForItem`)
- [Codeunit 7500 "Item Attribute Management"](../codeunit/7500.md) (1 call: `GetItemNoFilterText → AddQuotes`)
- [Page 1116 "Cost Budget Names"](../page/1116.md) (1 call: `GetSelectionFilter → GetSelectionFilterForCostBudgetName`)
- [Page 112 "Inventory Posting Groups"](../page/112.md) (1 call: `GetSelectionFilter → GetSelectionFilterForInventoryPostingGroup`)
- [Page 1122 "Chart of Cost Centers"](../page/1122.md) (1 call: `GetSelectionFilter → GetSelectionFilterForCostCenter`)
- [Page 1123 "Chart of Cost Objects"](../page/1123.md) (1 call: `GetSelectionFilter → GetSelectionFilterForCostObject`)
- [Page 1124 "Cost Type List"](../page/1124.md) (1 call: `GetSelectionFilter → GetSelectionFilterForCostType`)
- [Page 121 "G/L Budget Names"](../page/121.md) (1 call: `GetSelectionFilter → GetSelectionFilterForGLBudgetName`)
- [Page 14 "Salespersons/Purchasers"](../page/14.md) (1 call: `GetSelectionFilter → GetSelectionFilterForSalesPersonPurchaser`)
- [Page 15 "Location List"](../page/15.md) (1 call: `GetSelectionFilter → GetSelectionFilterForLocation`)
- [Page 18 "G/L Account List"](../page/18.md) (1 call: `GetSelectionFilter → GetSelectionFilterForGLAccount`)
- [Page 20401 "Qlty. Tests"](../page/20401.md) (1 call: `GetSelectionFilterForTest → GetSelectionFilter`)
- [Page 22 "Customer List"](../page/22.md) (1 call: `GetSelectionFilter → GetSelectionFilterForCustomer`)
- [Page 240 "Business Unit List"](../page/240.md) (1 call: `GetSelectionFilter → GetSelectionFilterForBusinessUnit`)
- [Page 2632 "Statistical Account List"](../page/2632.md) (1 call: `GetSelectionFilter → GetSelectionFilter`)
- [Page 27 "Vendor List"](../page/27.md) (1 call: `GetSelectionFilter → GetSelectionFilterForVendor`)
- [Page 2900 "Demand Forecast Variant Matrix"](../page/2900.md) (1 call: `LoadData → GetSelectionFilterForItem`)
- [Page 31 "Item List"](../page/31.md) (1 call: `GetSelectionFilter → GetSelectionFilterForItem`)
- [Page 436 "Reminder List"](../page/436.md) (1 call: `GetSelectionFilter → GetSelectionFilterForIssueReminder`)
- [Page 5 "Currencies"](../page/5.md) (1 call: `GetSelectionFilter → GetSelectionFilterForCurrency`)
- [Page 5052 "Contact List"](../page/5052.md) (1 call: `GetSelectionFilter → GetSelectionFilterForContact`)
- [Page 5087 "Campaign List"](../page/5087.md) (1 call: `GetSelectionFilter → GetSelectionFilterForCampaign`)
- [Page 512 "Customer Disc. Groups"](../page/512.md) (1 call: `GetSelectionFilter → GetSelectionFilterForCustomerDiscountGroup`)
- [Page 513 "Item Disc. Groups"](../page/513.md) (1 call: `GetSelectionFilter → GetSelectionFilterForItemDiscountGroup`)
- [Page 5201 "Employee List"](../page/5201.md) (1 call: `GetSelectionFilter → GetSelectionFilterForEmployee`)
- [Page 5401 "Item Variants"](../page/5401.md) (1 call: `GetSelectionFilter → GetSelectionFilterForItemVariant`)
- [Page 560 "Dimension Value List"](../page/560.md) (1 call: `GetSelectionFilter → GetSelectionFilterForDimensionValue`)
- [Page 5601 "Fixed Asset List"](../page/5601.md) (1 call: `GetSelectionFilter → GetSelectionFilterForFixedAsset`)
- [Page 5715 "Responsibility Center List"](../page/5715.md) (1 call: `GetSelectionFilter → GetSelectionFilterForResponsibilityCenter`)
- [Page 5730 "Item Categories"](../page/5730.md) (1 call: `GetSelectionFilter → GetSelectionFilterForItemCategory`)
- [Page 5801 "Cost Adjustment Overview"](../page/5801.md) (1 call: `RunAdjustCostItemEntries → GetSelectionFilterForItem`)
- [Page 608 "IC Partner List"](../page/608.md) (1 call: `GetSelectionFilter → GetSelectionFilterForICPartner`)
- [Page 6212 "Sustainability Account List"](../page/6212.md) (1 call: `GetSelectionFilter → GetSelectionFilter`)
- [Page 6508 "Lot No. Information List"](../page/6508.md) (1 call: `GetSelectionFilter → GetSelectionFilterForLotNoInformation`)
- [Page 6509 "Serial No. Information List"](../page/6509.md) (1 call: `GetSelectionFilter → GetSelectionFilterForSerialNoInformation`)
- and 20 more: data/code/graph/29/calls.json

## Across versions

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

## Countries that replace it

[BE](../../localizations/be.md)

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: "codeunit", object_name: "SelectionFilterManagement")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
