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

Announcements

No record found.

News and Announcements icon
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

(5) ShareShare
ReportReport
Posted on by 40
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
    293 on at
    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
    15,732 Super User 2026 Season 1 on at
    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.
  • Suggested answer
    Valentin Castravet Profile Picture
    32,152 Super User 2026 Season 1 on at
    This is on BC cloud so we cannot do anything from Backend from SQL. 
    You can use this app to do that - Table Data Editor 2.0
     
  • Suggested answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    14,302 Super User 2026 Season 1 on at
    Click on the Share Detail.
     
    You can get more information on there.
    Since this is a customisation, you need to ask your partner to help check it.
    There is a problem with the customisation because the length.
  • Suggested answer
    YUN ZHU Profile Picture
    99,055 Super User 2026 Season 1 on at
    I agree with Teddy; this isn't a standard issue.
    Please submit this to a partner.
    This needs to be controlled in the code.
     
    Thanks.
    ZHU
  • Suggested answer
    Sumit Singh Profile Picture
    11,757 Super User 2026 Season 1 on at
    Hi
    Agreed with above mentioned responses by experts that 3PL shipment line page having one field which is have character limit of 20. You need to connect with partner/develop to check this 
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    22,106 Super User 2026 Season 1 on at
    Somewhere in the “3PL Shipment Line” extension there’s a 20-char field, and your 3PL/integration sent a 24-char value. You’ll need to adjust either the field length (extension) or the incoming data (integration) to fix it. If Its third party please connect with solution provider. 
  • Gerardo Rentería García Profile Picture
    25,555 Most Valuable Professional on at
    Hi
    As other colleagues have mentioned, copy the error and send it to the developer or development company.
    Best
    Gr
  • Suggested answer
    Aman Kakkar Profile Picture
    2,977 Super User 2026 Season 1 on at

    Hi,

    If this issue occurs when opening the page, it’s likely that some custom code in the extension is dynamically calculating or assigning values to one of the fields at runtime — possibly in the OnAfterGetCurrRecord, OnAfterGetRecord, or OnOpenPage trigger.

    You may need to contact your partner or developer for a code-level review. They can easily identify the exact cause using the debugger.

    Hope this helps,
    Aman K

  • Suggested answer
    Pallavi Phade Profile Picture
    5,420 Super User 2026 Season 1 on at
    Namaste @Vijay Kharat
     
    We too have faced the same issue in past for some cases .
     
    You are correct fields are of length 20 in the table , this error appears when we do setrange or Setfilter on some column or variable in codeunit or report or some action
     
    Can you check which columns are passed for filtering or setrange . Explaining what we had faced with a dummy example
     
    Example 
    Lets say LocVar is of length 50 and i'm passing in below code to filter . But length of code in location table is 10 . It will not allow . You will get the above error .
     
    Location.setrange(Code,LocVar);
    If Location.findfirst then begin
     Statem1;
    Statem2;
    end;
     
    Please check your script and global or local variables used or reference variables used. . Somewhere data is exceeding length 20
     
    Regards
    Pallavi Phade 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,804 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,103 Super User 2026 Season 1

#3
Kamal Khakhkhar Profile Picture

Kamal Khakhkhar 695

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans