{"id":1622,"date":"2024-02-13T10:23:28","date_gmt":"2024-02-13T10:23:28","guid":{"rendered":"https:\/\/www.aegissofttech.com\/insights\/?p=1622"},"modified":"2026-04-29T07:07:34","modified_gmt":"2026-04-29T07:07:34","slug":"add-similar-property-in-all-fields","status":"publish","type":"post","link":"https:\/\/www.aegissofttech.com\/insights\/add-similar-property-in-all-fields\/","title":{"rendered":"How to Add a Similar Property in All Fields in Business Central"},"content":{"rendered":"\n<p>Making one field Editable = False is fine. Making 50 of them? That\u2019s the kind of task that makes you close VS Code, grab another coffee, and wonder why you didn\u2019t say no to the request in the first place.<\/p>\n\n\n\n<p>Learning how to add a similar property in all fields at once turns a repetitive slog into a quick, reliable process. With the right approach in VS Code, you can make bulk edits in minutes, keep your extensions clean, and cut down on mistakes.<\/p>\n\n\n\n<p>In this guide, we\u2019ll walk through exactly how to do it and share a few tips that make bulk changes in Business Central (BC) much less painful.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Key Takeaways<\/strong><\/p>\n\n\n\n<div style=\"border:1px solid #000; padding:15px; margin:20px 0;\">\nInstead of editing each field one by one, you can streamline the process in a few simple steps:\n<ul style=\"margin-top:10px; line-height:1.6;\">\n<li><b>Open the target AL object:<\/b> Load the correct table or page .al file in VS Code and confirm you\u2019re editing the right object.<\/li>\n<li><b>Select all fields:<\/b> Use Ctrl + F2 (Windows) or Cmd + F2 (Mac) to highlight all the field definitions you want to update.<\/li>\n<li><b>Position cursors:<\/b> Move each cursor to the end of the field line, hit Enter, and prep new lines for property insertion.<\/li>\n<li><b>Insert property:<\/b> Add the property you want (e.g., Editable = false;, ApplicationArea = All;, or a tooltip).<\/li>\n<li><b>Save and publish:<\/b> Save the file, then publish with AL: Publish without debugging to push updates to Business Central.<\/li>\n<li><b>Verify in client:<\/b> Test fields in BC to make sure properties behave as expected (read-only, visible\/hidden, default values, etc.).<\/li>\n<\/ul>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Why Bulk Field Customization is Needed<\/h2>\n\n\n\n<p>Making the same property change across dozens of fields may feel repetitive, but there are plenty of situations in <a href=\"https:\/\/www.aegissofttech.com\/insights\/what-is-microsoft-dynamics-business-central\/\" target=\"_blank\" rel=\"noreferrer noopener\">Microsoft Dynamics 365 Business Central<\/a> where it becomes necessary. These include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Fields on posted documents that must stay locked once transactions are finalized<\/li>\n\n\n\n<li>Audit fields like Created By or Last Modified Date that should never be editable<\/li>\n\n\n\n<li>Compliance-related fields that need consistent restrictions across multiple tables or pages<\/li>\n<\/ul>\n\n\n\n<p>These are not isolated cases. In most <a href=\"https:\/\/www.aegissofttech.com\/dynamics-365\/business-central-implementation\" target=\"_blank\" rel=\"noreferrer noopener\">Business Central implementations<\/a>, one minor customization request can lead to dozens of field updates across multiple objects.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Risks of Applying Properties Inconsistently<\/h3>\n\n\n\n<p>Applying a property to some fields and forgetting others creates problems later. A single editable field that should be locked can cause compliance issues, inaccurate reporting, or unnecessary data changes. Developers are also at risk of wasted effort during upgrades when inconsistent setups need to be corrected manually.<\/p>\n\n\n\n<p>Consistency in these changes matters as much as the customization itself. Without it, projects can slip, quality drops, and users lose trust in the solution.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step-by-Step Guide to Adding a Similar Property Across Fields<\/h2>\n\n\n\n<p>Using Visual Studio Code, you can update all fields of a table or page in one go, keeping your Business Central field customization<em> <\/em>consistent and error-free. Here\u2019s a full walkthrough.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step #1: Open the Target AL Object<\/h3>\n\n\n\n<p>Before adding a property, ensure you are working in the correct object:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open the<strong> .al file<\/strong> for the table or page you want to update in VS Code<\/li>\n\n\n\n<li>Scroll to the section containing all <strong>field definitions<\/strong><\/li>\n\n\n\n<li>Verify the object is correct to prevent changes in the wrong location<\/li>\n<\/ul>\n\n\n    \t<section class=\"call-to-action-section\">\n    \t\t<div class=\"call-to-action-container\">\n    \t\t\t<div class=\"call-to-action-body\">\n    \t\t\t\t<div class=\"cta-title\"><\/div>\n    \t\t\t\t<p><\/p>\n<div style='text-align:left; color:white;'>\n<b>Pro Tip<\/b>: Organize fields by function or workflow before applying the same property. This reduces the chance of affecting unrelated fields and ensures logical consistency across pages.<br \/>\nTeams that partner with <a href='https:\/\/www.aegissofttech.com' target='_blank'>Aegis Softtech<\/a> benefit from expert guidance in structuring tables and pages efficiently, ensuring bulk customizations stay precise and safe.<\/div>\n<p><\/p>\n    \t\t\t<\/div>\n    \t\t\t    \t\t<\/div>\n    \t<\/section>\n    \n\n\n\n<h3 class=\"wp-block-heading\">Step #2: Select All Fields for Editing<\/h3>\n\n\n\n<p>To apply a property across multiple fields, you need to select all the relevant field definitions:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Place the cursor on the first <strong>field definition<\/strong> you want to modify<\/li>\n\n\n\n<li>Press <strong>Ctrl + F2<\/strong> (Windows) or <strong>Cmd + F2<\/strong> (Mac) to <strong>multi-select all instances<\/strong> of that field pattern<\/li>\n\n\n\n<li>Confirm all target fields are highlighted before proceeding<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Step #3: Position the Cursor for Property Insertion<\/h3>\n\n\n\n<p>Next, position the cursors so that the property can be added correctly to each field:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Select <strong>End<\/strong> to move each cursor to the end of its line<\/li>\n\n\n\n<li>Press <strong>Enter<\/strong> to create a <strong>new line under each field definition<\/strong><\/li>\n\n\n\n<li>Verify that every selected field now has a cursor ready for property input<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Step #4: Insert the Property<\/h3>\n\n\n\n<p>Now add the property you want to apply across all fields. Here are common examples:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use <strong>Editable = false<\/strong>; to make fields read-only<\/li>\n\n\n\n<li>Use <strong>ApplicationArea = All<\/strong>; to make fields visible to all roles<\/li>\n\n\n\n<li>Use <strong>ToolTip = \u2018Enter value here\u2019<\/strong>; to add guidance for users<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Step #5: Save and Publish Changes<\/h3>\n\n\n\n<p>After inserting the property, save and deploy your changes to <a href=\"https:\/\/www.aegissofttech.com\/dynamics-365\/business-central-consulting\" target=\"_blank\" rel=\"noreferrer noopener\">Business Central<\/a>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Save the <strong>.al file<\/strong> in VS Code<\/li>\n\n\n\n<li>Press <strong>Ctrl + Shift + P<\/strong> and select <strong>AL: Publish without debugging<\/strong><\/li>\n\n\n\n<li>Open the page or table in Business Central to confirm the property has been applied<\/li>\n<\/ul>\n\n\n\n<p>Publishing immediately allows you to verify the results in the client environment.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step #6: Verify the Property Works<\/h3>\n\n\n\n<p>Finally, test that the property behaves as expected:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Confirm fields are read-only if <strong>Editable = false;<\/strong> was applied<\/li>\n\n\n\n<li>Check visibility or hidden fields for correct display<\/li>\n\n\n\n<li>Test default values and validation rules to ensure accurate data entry<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Types of Field Properties in Business Central<\/h2>\n\n\n\n<p>It\u2019s important to understand how individual properties affect user interaction and data control. Let\u2019s walk through some of the key fields in Business Central.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Editable\/ReadOnly Properties<\/h3>\n\n\n\n<p>The <strong>Editable <\/strong>property determines if a user can change a field value. When set to <strong>false<\/strong>, the field becomes read-only on a page, even though the table itself may still allow edits. Page-level settings override individual ones, which matters when applying restrictions across larger sections.<\/p>\n\n\n\n<p>You might use it to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Lock audit fields such as Created Date or Modified Date<\/li>\n\n\n\n<li>Prevent edits on posted document fields to protect historical accuracy<\/li>\n\n\n\n<li>Disable input across a group of related fields for consistency<\/li>\n<\/ul>\n\n\n\n<section class=\"call-to-action-section\">\n<div class=\"call-to-action-container\">\n<div class=\"call-to-action-body\">\n<div class=\"cta-title\"><\/div>\n<p><\/p>\n<div style=\"text-align:center; color:white;\">\n<strong>Also Read:<\/strong> <a href=\"https:\/\/www.aegissofttech.com\/insights\/dynamics-business-central-pros-cons\/\" target=\"_blank\">Microsoft Dynamics 365 Business Central Pros and Cons<\/a><\/div>\n<p><\/p>\n<\/div>\n<\/div>\n<\/section>\n\n\n\n<h3 class=\"wp-block-heading\">Visible\/Hidden Properties<\/h3>\n\n\n\n<p>The <strong>Visible <\/strong>property decides whether a field shows up on the UI. Developers often pair it with Boolean variables or triggers to dynamically show or hide fields, keeping pages clean and intuitive.<\/p>\n\n\n\n<p>Practical cases include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Hiding fields only relevant to certain workflows<\/li>\n\n\n\n<li>Revealing additional options during <strong>OnOpenPage <\/strong>or <strong>OnInit <\/strong>events<\/li>\n\n\n\n<li>Streamlining complex layouts by hiding advanced settings<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Caption and Formatting Properties<\/h3>\n\n\n\n<p>Captions and formatting improve readability and multilingual support. For Business Central page properties, captions define how fields appear, while formatting ensures data, such as like decimals or currency, looks consistent. Developers rely on these settings to create a user interface that feels clear across different regions and languages.<\/p>\n\n\n\n<p>Here are the most important ones to know:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Caption <\/strong>provides the label that users see in the UI<\/li>\n\n\n\n<li><strong>CaptionML <\/strong>handles translations for multiple languages<\/li>\n\n\n\n<li><strong>AutoFormatType <\/strong>and <strong>DecimalPlaces <\/strong>control how numbers, currencies, and decimals display<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Validation and Default Values<\/h3>\n\n\n\n<p>Validation and defaults play a big role in keeping records accurate.<\/p>\n\n\n\n<p>Setting rules and initial states helps developers reduce the chances of bad data creeping into the system. These properties are especially important when applying how to add a similar property in all fields at once, since errors compound quickly across multiple objects.<\/p>\n\n\n\n<p>Some commonly used settings include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>InitValue <\/strong>to set a default when creating new records<\/li>\n\n\n\n<li><strong>FieldValidate <\/strong>to enforce rules through validation logic at input<\/li>\n\n\n\n<li><strong>ValidateTableRelation <\/strong>to ensure entries match records in related tables<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Best Practices for Bulk Customization in Business Central<\/h2>\n\n\n\n<p>Bulk property changes can save time, but without care, they can create bigger headaches later.<\/p>\n\n\n\n<p>Follow these best practices to ensure Business Central field customization remains maintainable, reliable, and ready for <a href=\"https:\/\/www.aegissofttech.com\/insights\/business-central-wave-2-release\/\" target=\"_blank\" rel=\"noreferrer noopener\">future updates<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Test Changes in Sandbox Environments<\/h3>\n\n\n\n<p>Always verify bulk updates in a sandbox before deploying to production. Testing allows you to catch issues early and ensures your changes work as expected. When preparing for testing, consider:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Confirm that fields set to <strong>Editable = false; <\/strong>or <strong>Visible = false;<\/strong> behave correctly in the client interface<\/li>\n\n\n\n<li>Validate workflows, reports, and page navigation to ensure no unintended side effects<\/li>\n\n\n\n<li>Check for interactions with existing extensions, triggers, or automation processes<\/li>\n<\/ul>\n\n\n\n<p>Sandbox testing prevents errors from affecting live data and gives teams confidence that changes are safe to deploy.<\/p>\n\n\n    \t<section class=\"call-to-action-section\">\n    \t\t<div class=\"call-to-action-container\">\n    \t\t\t<div class=\"call-to-action-body\">\n    \t\t\t\t<div class=\"cta-title\"><\/div>\n    \t\t\t\t<p><\/p>\n<div style='text-align:left; color:white;'>\n<b>Pro Tip<\/b>: Bulk changes can affect page load times or rendering in complex pages. Test performance on pages with many fields before production deployment.<\/div>\n<p><\/p>\n    \t\t\t<\/div>\n    \t\t\t    \t\t<\/div>\n    \t<\/section>\n    \n\n\n\n<h3 class=\"wp-block-heading\">Avoid Over-Customizing Standard Objects<\/h3>\n\n\n\n<p>Excessive customization of standard tables or pages can create upgrade headaches. Keep modifications minimal and intentional. Here are some tips:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Limit changes to fields critical for business processes<\/li>\n\n\n\n<li>Extend standard objects using AL extensions instead of direct modifications<\/li>\n\n\n\n<li>Focus on maintaining a clean separation between standard and customized functionality<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Document All Property Changes<\/h3>\n\n\n\n<p>Keeping a detailed record of bulk property changes makes ongoing development and troubleshooting much easier. Effective documentation should:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Specify which properties were applied to each field, such as <strong>Editable = false;<\/strong><\/li>\n\n\n\n<li>Explain the business reason for the change and any dependencies on other fields or pages<\/li>\n\n\n\n<li>Include instructions for reversing changes if needed<\/li>\n<\/ul>\n\n\n\n<p>Good documentation ensures transparency and keeps the team aligned.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Prepare for Upgrades (Extension vs. Modification)<\/h3>\n\n\n\n<p>Plan bulk updates with upgrades in mind to avoid conflicts with new versions of Business Central. Key considerations include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Apply bulk property changes via extensions wherever possible to preserve standard objects<\/li>\n\n\n\n<li>Avoid direct modifications to base tables or pages unless necessary<\/li>\n\n\n\n<li>Test your extensions against new releases before production deployment<\/li>\n<\/ul>\n\n\n\n<section class=\"call-to-action-section\">\n<div class=\"call-to-action-container\">\n<div class=\"call-to-action-body\">\n<div class=\"cta-title\"><\/div>\n<p><\/p>\n<div style=\"text-align:center; color:white;\">\n<strong>Also Read:<\/strong> <a href=\"https:\/\/www.aegissofttech.com\/insights\/business-central-al-code\/\" target=\"_blank\">Business Central AL Code Guide for Developers and IT Leaders<\/a><\/div>\n<p><\/p>\n<\/div>\n<\/div>\n<\/section>\n\n\n\n<h2 class=\"wp-block-heading\">Simplify Multi-Field Customization in BC With Aegis Softtech<\/h2>\n\n\n\n<p>Learning how to add a similar property in all fields at once ensures your BC tables and pages remain consistent and accurate.<\/p>\n\n\n\n<p>The structured steps detailed in this blog post reduce errors, sandbox testing verifies changes before deployment, and thorough documentation protects standard objects while preparing your customizations for future upgrades.<\/p>\n\n\n\n<p>Executed correctly, bulk property updates save time and maintain data integrity.<\/p>\n\n\n\n<p>Aegis Softtech delivers precise Business Central field customization solutions. Our team applies bulk property updates, enforces best practices, and ensures pages, tables, and validations perform as intended. We also manage extensions, plan for upgrades, and verify functionality so your Business Central environment remains reliable and scalable.<\/p>\n\n\n    \t<section class=\"call-to-action-section\">\n    \t\t<div class=\"call-to-action-container\">\n    \t\t\t<div class=\"call-to-action-body\">\n    \t\t\t\t<div class=\"cta-title\"><\/div>\n    \t\t\t\t<p><\/p>\n<div style='text-align:left; color:white;'>\nTake control of your Business Central setup.<br \/>\n<a href='https:\/\/www.aegissofttech.com\/contact-us.html' target='_blank'>Contact us today<\/a> to maintain clean, consistent, and maintainable customizations.<\/div>\n<p><\/p>\n    \t\t\t<\/div>\n    \t\t\t    \t\t<\/div>\n    \t<\/section>\n    \n\n\n\n<h2 class=\"wp-block-heading\">FAQs<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Can I bulk apply a property to fields in posted documents?<\/h3>\n\n\n\n<p>Yes, you can apply the same property to multiple fields in posted documents using Visual Studio Code. When you learn how to add a similar property in all fields at once, you can update table or page fields efficiently while maintaining data consistency.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. What are the best practices for customizing fields in AL code?<\/h3>\n\n\n\n<p>Focus on structured and maintainable Business Central field customization. Group related fields, test updates in sandbox environments, document all changes, and prefer extensions over direct modifications. This approach keeps pages and tables consistent, reduces errors, and simplifies future upgrades.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. Does bulk customization affect Business Central upgrades?<\/h3>\n\n\n\n<p>Yes, if changes modify standard objects directly. Applying bulk updates via extensions protects standard tables and pages, making upgrades smoother. Planning and documenting all updates ensures your Business Central page properties remain consistent and your environment stays compatible with future releases.<\/p>\n","protected":false},"excerpt":{"rendered":" ","protected":false},"author":9,"featured_media":19255,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[124],"tags":[1622],"class_list":["post-1622","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-business-central","tag-how-to-add-a-similar-property-in-all-fields-at-once"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.aegissofttech.com\/insights\/wp-json\/wp\/v2\/posts\/1622","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aegissofttech.com\/insights\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aegissofttech.com\/insights\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aegissofttech.com\/insights\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aegissofttech.com\/insights\/wp-json\/wp\/v2\/comments?post=1622"}],"version-history":[{"count":7,"href":"https:\/\/www.aegissofttech.com\/insights\/wp-json\/wp\/v2\/posts\/1622\/revisions"}],"predecessor-version":[{"id":19257,"href":"https:\/\/www.aegissofttech.com\/insights\/wp-json\/wp\/v2\/posts\/1622\/revisions\/19257"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.aegissofttech.com\/insights\/wp-json\/wp\/v2\/media\/19255"}],"wp:attachment":[{"href":"https:\/\/www.aegissofttech.com\/insights\/wp-json\/wp\/v2\/media?parent=1622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aegissofttech.com\/insights\/wp-json\/wp\/v2\/categories?post=1622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aegissofttech.com\/insights\/wp-json\/wp\/v2\/tags?post=1622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}