Skip to main content

Notifications

Community site session details

Community site session details

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

Overflow of data in field causing problems

(1) ShareShare
ReportReport
Posted on by 297
Hello!
 
I have a field in the table 336 /Tracking Specification/ that can contain Code[50].
I am currently facing an issue with a big order with a lot of Batch Numbers, and it tries to insert more than the 50 allowed characters in the field, giving an error. The field is standard, so I am not able to modify the length it can take.

This is the field:
 
field(5400; /Lot No./; Code[50])
        {
            Caption = 'Lot No.';
 
            trigger OnValidate()
            begin
                if /Lot No./ <> xRec./Lot No./ then begin
                    TestField(/Quantity Handled (Base)/, 0);
                    TestField(/Appl.-from Item Entry/, 0);
                    if IsReclass() then
                        /New Lot No./ := /Lot No./;
                    WMSManagement.CheckItemTrackingChange(Rec, xRec);
                    InitExpirationDate();
                end;
            end;
        }


Is there any way I can add something to the field to control its length, avoiding an error all together, while also adding the overflow data to another field, which I can then add to the report for show?
Or are there any better ways of controlling the data overflow for such fields?

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Featured topics

Product updates

Dynamics 365 release plans