Migrate obsoleted "Object Name" field to "Name" and fix silent truncation#9312
Draft
SBalslev wants to merge 1 commit into
Draft
Migrate obsoleted "Object Name" field to "Name" and fix silent truncation#9312SBalslev wants to merge 1 commit into
SBalslev wants to merge 1 commit into
Conversation
…tion The "Object Name" field (Text[30]) on system virtual tables AllObj (2000000038), AllObjWithCaption (2000000058), and System Object (2000000029) was obsoleted and replaced by a new "Name" field (Text[100]). - Migrate all references from "Object Name" to Name across the repo. - Widen persisted fields/FlowFields that receive object names to Text[100] (non-breaking): ObjectTranslation, ExportProtocol, CALTestResult, ChangeGlobalDimLogEntry, GenericChartSetup, TaxEntity, EntityAttributeMapping, MigrationTableMapping. - Widen byref (var) parameter chains and their callers to Text[100] to preserve AL's exact-type matching (INTaxEngine object/table lookups, GenericChartMgt, ScriptSymbolLookupDialog publishers and TaxTypeObjectHelper subscribers). - Fix JSON round-trip: read object names with unbounded JToken2Text instead of JToken2Text30 to avoid truncating names before exact-match lookups. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
|
Could not find a linked ADO work item. Please link one by using the pattern 'AB#' followed by the relevant work item number. You may use the 'Fixes' keyword to automatically resolve the work item when the pull request is merged. E.g. 'Fixes AB#1234' |
pri-kise
reviewed
Jul 10, 2026
| @@ -28,7 +28,7 @@ tableextension 6374 "Transformation Rule" extends "Transformation Rule" | |||
| } | |||
| field(6371; "Lookup Table Name"; Text[30]) | |||
Contributor
There was a problem hiding this comment.
I know that the PR is now only draft, but I was just wanted to confirm:
will those field length be updated to the new length (This is how I understood the PR description)?
Do we need obsoletion process like it was done for the home page field in the Base App?
That would require 3 Releases and the CalcForumula couldn't be changed right now.
Or will the platform ignore overflow of Lookups?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
BLOCKED — do not merge yet. This PR migrates references from the obsoleted
"Object Name"field to the newNamefield on the platform virtual tables AllObj (2000000038), AllObjWithCaption (2000000058), and System Object (2000000029).CI currently fails all app builds with
AL0132 / AL0186 'Name' does not existbecause the newNamefield has not yet shipped into the platform symbols/artifacts that BCApps compiles against. It exists only in the platform source branch.This PR can only go green once the platform change adding the
Namefield is released into the BCApps build artifacts. The migration code itself is correct — the missing-field errors are the only compile failures. Parked as draft until the platform dependency lands.What & why
The
"Object Name"field (Text[30]) on the system virtual tables AllObj (2000000038), AllObjWithCaption (2000000058), and System Object (2000000029) was obsoleted on the platform and replaced by a newNamefield (Text[100]). This PR migrates every reference in BCApps and eliminates the silent truncation the widened type would otherwise cause."Object Name"usages on these three tables toName(144 files).Text[100](non-breaking):ObjectTranslation,ExportProtocol,CALTestResult,ChangeGlobalDimLogEntry,GenericChartSetup,TaxEntity,EntityAttributeMapping,MigrationTableMapping.var) parameter chains and their callers toText[100]— AL requires byref arguments to match the parameter type exactly (including length), soText[100]cannot flow intovar Text. Affects the INTaxEngine object/table lookup cascade (AppObjectHelper,TaxTypeObjectHelper),GenericChartMgt, and theScriptSymbolLookupDialogpublishers andTaxTypeObjectHelpersubscribers.JToken2Text30(truncating to 30) before an exact-match lookup; switched the object-name sites to the unboundedJToken2Textso long names resolve.Convention applied: by-value params & return values to unbounded
Text; persisted table fields & FlowFields toText[100]; byref params and everything passed into them toText[100]. Increasing an AL text length is non-breaking (only shortening needs a data upgrade).Linked work
Fixes #
How I validated this
AppObjectHelperTests/TaxTypeObjectHelperTests, test-runner suites); no new tests added since this is a field rename + width-safety change.What I tested and the outcome
Namevalue flows: all:= <table>.Nameassignments land in unboundedText,Text[100], orText[128]; allexit(...Name)return sites return unboundedText/Text[256].Risk & compatibility
Text[30]toText[100]), which are non-breaking and need no data upgrade."Object Name"fields on unrelated tables (Tenant Permission,Metadata Permission,Expanded Permission,Application Object Metadata) are intentionally untouched.