---
id: post/gerardorenteria-blog/12557
type: post
title: "🔐 Partial Masking in Business Central: Smart Data Protection 👀"
summary: Business Central BC27 introduced MaskType for client-side data protection, but the post demonstrates a custom solution that extends this with configurable partial masking patterns (Last Four Digits, First And Last Two, Middle Visible, Full Mask) for any field in any table, allowing users to toggle between masked and full views.
tier: community
language: en
tags:
  - data protection
  - masking
  - security
  - al development
  - bc27
  - field configuration
  - client-side protection
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-08T01:58:35.350Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: 1af0a96697a5be9fceb171cccd5810dd5914e584e68309b320de144e40f1ed68
evidence:
  - kind: blog
    url: https://gerardorenteria.blog/2025/11/02/%f0%9f%94%90-partial-masking-in-business-central-smart-data-protection-%f0%9f%91%80/
    title: "🔐 Partial Masking in Business Central: Smart Data Protection 👀"
    date: "2025-11-02"
    commit: null
    t: null
    quote: null
  - kind: blog
    url: https://gerardorenteria.blog/2025/11/02/%f0%9f%94%90-partial-masking-in-business-central-smart-data-protection-%f0%9f%91%80/
    title: "🔐 Partial Masking in Business Central: Smart Data Protection 👀"
    date: "2025-11-02"
    commit: null
    t: null
    quote: "The MaskType property offers two states: None or Concealed. While this provides basic protection, it's an all-or-nothing approach."
  - kind: blog
    url: https://gerardorenteria.blog/2025/11/02/%f0%9f%94%90-partial-masking-in-business-central-smart-data-protection-%f0%9f%91%80/
    title: "🔐 Partial Masking in Business Central: Smart Data Protection 👀"
    date: "2025-11-02"
    commit: null
    t: null
    quote: Instead of completely hiding or revealing the data, you can choose exactly which portion to display.
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
post_id: "12557"
source_id: gerardorenteria-blog
source_name: Gerardo Renteria
url: https://gerardorenteria.blog/2025/11/02/%f0%9f%94%90-partial-masking-in-business-central-smart-data-protection-%f0%9f%91%80/
published_at: "2025-11-02T21:22:25.000Z"
author: Gerardo Renteria
full_text: false
words: 573
quotes:
  - text: "The MaskType property offers two states: None or Concealed. While this provides basic protection, it's an all-or-nothing approach."
    why_it_matters: Explains the limitation of the native feature that motivated the custom solution
  - text: Instead of completely hiding or revealing the data, you can choose exactly which portion to display.
    why_it_matters: Describes the core benefit of the partial masking approach over binary masking
code_objects_mentioned:
  - enum GDRGMaskPattern
  - codeunit GDRGMaskingManagement
  - table GDRGFieldMaskingSetup
  - page GDRGFieldMaskingSetup
  - page GDRGFieldMaskingLookup
  - permissionset GDRGMasking
systems:
  - development
  - administration
  - platform
versions_mentioned:
  - BC27
preview:
  embeddable: true
  frame_url: https://gerardorenteria.blog/2025/11/02/%f0%9f%94%90-partial-masking-in-business-central-smart-data-protection-%f0%9f%91%80/embed/
  image: https://i0.wp.com/gerardorenteria.blog/wp-content/uploads/2025/11/designer.png?fit=1200%2C800&ssl=1
  image_alt: null
  image_w: 1200
  image_h: 800
  site_name: Gerardo Rentería Blog
  favicon: https://gerardorenteria.blog/wp-content/uploads/2020/11/cropped-wolficon.jpg?w=32
  probed_at: "2026-10-07T11:51:51.598Z"
---

# 🔐 Partial Masking in Business Central: Smart Data Protection 👀

[Read the post](https://gerardorenteria.blog/2025/11/02/%f0%9f%94%90-partial-masking-in-business-central-smart-data-protection-%f0%9f%91%80/) · Gerardo Renteria (Gerardo Renteria) · 2025-11-02 · 573 words · tier community · reviewed (checked by Opus)

> Business Central BC27 introduced MaskType for client-side data protection, but the post demonstrates a custom solution that extends this with configurable partial masking patterns (Last Four Digits, First And Last Two, Middle Visible, Full Mask) for any field in any table, allowing users to toggle between masked and full views.

## Key points

- BC27's MaskType property offers only binary protection (None or Concealed), which the author enhances with four customizable masking patterns
- The solution uses a centralized configuration table to define which fields should be masked and which pattern to apply
- Page extensions add calculated fields with assist buttons to toggle between partial and complete data display
- The implementation includes enum patterns, management codeunit, configuration storage, and permission set components

## Quotes

- "The MaskType property offers two states: None or Concealed. While this provides basic protection, it's an all-or-nothing approach." (Explains the limitation of the native feature that motivated the custom solution)
- "Instead of completely hiding or revealing the data, you can choose exactly which portion to display." (Describes the core benefit of the partial masking approach over binary masking)

## 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.

- enum "GDRGMaskPattern"
- codeunit "GDRGMaskingManagement"
- table "GDRGFieldMaskingSetup"
- page "GDRGFieldMaskingSetup"
- page "GDRGFieldMaskingLookup"
- permissionset "GDRGMasking"

Not found in BC28-30: enum "GDRGMaskPattern", codeunit "GDRGMaskingManagement", table "GDRGFieldMaskingSetup", page "GDRGFieldMaskingSetup", page "GDRGFieldMaskingLookup", permissionset "GDRGMasking".

## Context

- Features: partial masking, custom masking patterns, centralized configuration, data protection, toggle between masked and full view, standard field extension
- Versions: BC27

Source: Gerardo Renteria, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.
