web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

The Length The length of the string is 24, but it must be less than or equal to 20 characters

(1) ShareShare
ReportReport
Posted on by 32
We are facing the issue while opening the page, Table and API, Below is the issue we are getting for that table
 
The length of the string is 24, but it must be less than or equal to 20 characters. Value: KTA-622654-XL-GREY-MARLE
 
Page 3PL Shipment Line has to close.
 
 
I was try to find the value in that table of all fields of size 20 code but not found. This is on BC cloud so we cannot do anything from Backend from SQL. Please let me know if any one known this issue.   
I have the same question (0)
  • Suggested answer
    TarikJerkovich Profile Picture
    72 on at
    The Length The length of the string is 24, but it must be less than or equal to 20 characters
    Hi,
    What to check is:
    • Identify the exact field that’s failing
    • Open the page and press Ctrl+Alt+F1 (Page Inspection).
    • Note the Source Table and the Field that shows the 24-char value.
    • You’re looking for a field defined as Code[20] receiving that value.
    Confirm field definition:
    • In your AL project(s), search the source table (and any table extensions for it) for that field.
    • Verify its DataType/Length (likely Code[20]). Check any TableRelation or Validate triggers that might copy a longer value into it.
    Check where the value comes from:
    • Page extension / UI logic: Any OnValidate, OnAfterGetRecord, or CalcFields that assign the 24-char SKU to a Code[20] field?
    • API/integration: Inspect the incoming JSON/payload mapping to this field on create/update.
    • Events/subscribers: Search for OnBeforeValidate/OnAfterValidate subscribers touching this field/record.
    Typical candidates on shipment lines:
    • Custom fields like SKU, Item Reference, Barcode, Color/Size etc. often are Code[20]. The value looks like an item reference/SKU. Verify mappings for those first.
    Replicate safely and capture:
    • Try creating a new line with just that value to trigger the error while Page Inspection is open, so you can see the field at the moment of failure.
  • Suggested answer
    Jainam M. Kothari Profile Picture
    12,725 Super User 2025 Season 2 on at
    The Length The length of the string is 24, but it must be less than or equal to 20 characters
    Hello,
     
    This error typically happens when data from an external source or API doesn't match the field's defined length constraint.
     
    To resolve it, you can either increase the field length in your extension (if possible), validate or truncate incoming data before insertion, or have the external system send shorter values.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Sumit Singh Profile Picture

Sumit Singh 2,106

#2
YUN ZHU Profile Picture

YUN ZHU 1,752 Super User 2025 Season 2

#3
OussamaSabbouh Profile Picture

OussamaSabbouh 1,670

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans