---
id: post/yzhums-com/63922
type: post
title: "Dynamics 365 Business Central: How to use Page.SetSelectionFilter Method in temporary records"
summary: "Page.SetSelectionFilter marks user-selected records but doesn't work directly with temporary records without additional setup. The post demonstrates two approaches: manually transferring data from source records to temporary records, or using Record.Copy with the ShareTable parameter set to true when both records are temporary."
tier: community
language: en
tags:
  - page methods
  - temporary records
  - record filtering
  - al code
  - selection handling
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-26T06:42:40.221Z"
  flags: []
generated:
  at: "2026-10-26T05:51:10.938Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: 573cc5b914281eeecfb7b09af19527b50a03fb9b37a9518df0e30b5cc7a1ab4a
evidence:
  - kind: blog
    url: https://yzhums.com/63922/
    title: "Dynamics 365 Business Central: How to use Page.SetSelectionFilter Method in temporary records"
    date: "2025-06-02"
    commit: null
    t: null
    quote: null
  - kind: blog
    url: https://yzhums.com/63922/
    title: "Dynamics 365 Business Central: How to use Page.SetSelectionFilter Method in temporary records"
    date: "2025-06-02"
    commit: null
    t: null
    quote: Page.SetSelectionFilter(var Record) is a very commonly used method, which can get the value currently selected by the user.
  - kind: blog
    url: https://yzhums.com/63922/
    title: "Dynamics 365 Business Central: How to use Page.SetSelectionFilter Method in temporary records"
    date: "2025-06-02"
    commit: null
    t: null
    quote: If the variable is temporary, the value will not be obtained. Because we did not assign values to this temporary table in advance.
  - kind: blog
    url: https://yzhums.com/63922/
    title: "Dynamics 365 Business Central: How to use Page.SetSelectionFilter Method in temporary records"
    date: "2025-06-02"
    commit: null
    t: null
    quote: If FromRecord and Record are both temporary and ShareTable is true, then the COPY method causes Record to reference the same table as FromRecord.
links:
  learn: []
  objects:
    - object/page/22
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  related:
    - to: post/gerardorenteria-blog/12961
      title: 🕐 Remember When Lists Could Sort By Any Key? 🔄
      label: possibly related
      why: both name Page 22 "Customer List"
      by: code
    - to: video/KmuTVkodRXM
      title: All new goodies about AL Namespace in BC 2025 wave 2
      label: possibly related
      why: both name Page 22 "Customer List"
      by: code
    - to: video/H7R_m8Ue38g
      title: "Business Central v29: System Audit Fields Now Available in Analysis Mode"
      label: possibly related
      why: both name Page 22 "Customer List"
      by: code
    - to: post/yzhums-com/63595
      title: "Dynamics 365 Business Central: Convert Word (.docx) To PDF (.pdf) within BC (No control add-in and APIs)"
      label: possibly related
      why: both name Page 22 "Customer List"
      by: code
    - to: post/yzhums-com/68731
      title: "Dynamics 365 Business Central: How to get current Profile (Role) info (Profile ID, Display Name, Source, Role Center ID, etc.) via AL"
      label: possibly related
      why: both name Page 22 "Customer List"
      by: code
    - to: post/yzhums-com/56521
      title: "Dynamics 365 Business Central: How to hide/disable New, Edit (Edit List), and Delete actions on the page"
      label: possibly related
      why: both name Page 22 "Customer List"
      by: code
    - to: post/yzhums-com/67552
      title: "Dynamics 365 Business Central: How to quickly get User Experience/Experience Tier (Essential or Premium) in AL"
      label: possibly related
      why: both name Page 22 "Customer List"
      by: code
    - to: post/yzhums-com/72040
      title: "Dynamics 365 Business Central: How to quickly identify the first transaction date and the number of days since the last sale with a customer"
      label: possibly related
      why: both name Page 22 "Customer List"
      by: code
    - to: post/yzhums-com/61818
      title: "Dynamics 365 Business Central: How to substitute a page for another page via AL"
      label: possibly related
      why: both name Page 22 "Customer List"
      by: code
    - to: post/thedynamicsexplorer-com/36822
      title: Dynamics GP to Business Central – What does my migrated GP Historical Data look like in Business Central
      label: possibly related
      why: both name Page 22 "Customer List"
      by: code
post_id: "63922"
source_id: yzhums-com
source_name: Dynamics 365 Lab - Yun Zhu
url: https://yzhums.com/63922/
published_at: "2025-06-02T01:11:28.000Z"
author: Yun Zhu
full_text: false
words: 637
quotes:
  - text: Page.SetSelectionFilter(var Record) is a very commonly used method, which can get the value currently selected by the user.
    why_it_matters: Establishes the core purpose of the method that developers need to understand
  - text: If the variable is temporary, the value will not be obtained. Because we did not assign values to this temporary table in advance.
    why_it_matters: Identifies the key problem that developers encounter when working with temporary records
  - text: If FromRecord and Record are both temporary and ShareTable is true, then the COPY method causes Record to reference the same table as FromRecord.
    why_it_matters: Explains the critical mechanism for handling temporary records with SetSelectionFilter
code_objects_mentioned:
  - page Customer List
systems:
  - development
versions_mentioned: []
cautions:
  - kind: gotcha
    quote: If the variable is temporary, the value will not be obtained.
    objects: []
    events: []
    versions: []
  - kind: warning
    quote: Note that if the original table is not a temporary table, [Optional] ShareTable = true cannot be used.
    objects: []
    events: []
    versions: []
preview:
  embeddable: true
  frame_url: null
  image: https://yzhums.com/wp-content/uploads/2025/06/Snipaste_2025-06-02_09-54-04.png
  image_alt: null
  image_w: null
  image_h: null
  site_name: Dynamics 365 Lab
  favicon: https://yzhums.com/wp-content/uploads/2020/08/cropped-logo-3-32x32.png
  probed_at: "2026-10-26T06:19:49.326Z"
---

# Dynamics 365 Business Central: How to use Page.SetSelectionFilter Method in temporary records

[Read the post](https://yzhums.com/63922/) · Dynamics 365 Lab - Yun Zhu (Yun Zhu, MVP) · 2025-06-02 · 637 words · tier community · reviewed (checked by Opus)

> Page.SetSelectionFilter marks user-selected records but doesn't work directly with temporary records without additional setup. The post demonstrates two approaches: manually transferring data from source records to temporary records, or using Record.Copy with the ShareTable parameter set to true when both records are temporary.

## Key points

- Page.SetSelectionFilter notes user selections and filters to marked records only, but temporary records need data assigned beforehand
- For normal source tables, retrieve data using FindSet and TransferFields to populate temporary records before applying SetSelectionFilter
- For pages with temporary source tables, use Record.Copy with ShareTable set to true to reference the same table and apply SetSelectionFilter
- The ShareTable parameter in Record.Copy can only be true when both records are temporary

## Quotes

- "Page.SetSelectionFilter(var Record) is a very commonly used method, which can get the value currently selected by the user." (Establishes the core purpose of the method that developers need to understand)
- "If the variable is temporary, the value will not be obtained. Because we did not assign values to this temporary table in advance." (Identifies the key problem that developers encounter when working with temporary records)
- "If FromRecord and Record are both temporary and ShareTable is true, then the COPY method causes Record to reference the same table as FromRecord." (Explains the critical mechanism for handling temporary records with SetSelectionFilter)

## AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

- [page 22 "Customer List"](../../objects/page/22.md)

## Possibly related

No source states these links: they share an object, a model read them, or a person found the same subject.

- [🕐 Remember When Lists Could Sort By Any Key? 🔄](../../posts/gerardorenteria-blog/12961.md) — possibly related: both name Page 22 "Customer List"
- [All new goodies about AL Namespace in BC 2025 wave 2](../../videos/KmuTVkodRXM.md) — possibly related: both name Page 22 "Customer List"
- [Business Central v29: System Audit Fields Now Available in Analysis Mode](../../videos/H7R_m8Ue38g.md) — possibly related: both name Page 22 "Customer List"
- [Dynamics 365 Business Central: Convert Word (.docx) To PDF (.pdf) within BC (No control add-in and APIs)](../../posts/yzhums-com/63595.md) — possibly related: both name Page 22 "Customer List"
- [Dynamics 365 Business Central: How to get current Profile (Role) info (Profile ID, Display Name, Source, Role Center ID, etc.) via AL](../../posts/yzhums-com/68731.md) — possibly related: both name Page 22 "Customer List"
- [Dynamics 365 Business Central: How to hide/disable New, Edit (Edit List), and Delete actions on the page](../../posts/yzhums-com/56521.md) — possibly related: both name Page 22 "Customer List"
- [Dynamics 365 Business Central: How to quickly get User Experience/Experience Tier (Essential or Premium) in AL](../../posts/yzhums-com/67552.md) — possibly related: both name Page 22 "Customer List"
- [Dynamics 365 Business Central: How to quickly identify the first transaction date and the number of days since the last sale with a customer](../../posts/yzhums-com/72040.md) — possibly related: both name Page 22 "Customer List"
- [Dynamics 365 Business Central: How to substitute a page for another page via AL](../../posts/yzhums-com/61818.md) — possibly related: both name Page 22 "Customer List"
- [Dynamics GP to Business Central – What does my migrated GP Historical Data look like in Business Central](../../posts/thedynamicsexplorer-com/36822.md) — possibly related: both name Page 22 "Customer List"

## Heads up

- gotcha: "If the variable is temporary, the value will not be obtained."
- warning: "Note that if the original table is not a temporary table, [Optional] ShareTable = true cannot be used."

## Context

- Features: Page.SetSelectionFilter method, Record.Copy method, Temporary records, Record selection, Filtering marked records, TransferFields

Source: Dynamics 365 Lab - Yun Zhu, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.
