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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

Set a default value for the new field type text across the page.

(0) ShareShare
ReportReport
Posted on by 12

Hi

I tried to customize a page by adding a new field with a default value.

How can I do this?

Screenshot-_2800_84_2900_.png

I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    102,079 Super User 2026 Season 1 on at

    Hi, hope the following helps.

    How to set the initial value (Automatically set default value for field)

    https://yzhums.com/11876/

    Thanks.

    ZHU

  • Suggested answer
    Lama Khaled Profile Picture
    12 on at

    Hello Mr.ZHU

    Thanks for all your effort when you help us, always you write the best result.

    I have really used the InitValue property but it's not used with the BLOB datatype field.

    It's correct with the Text datatype field but the problem with the Text field is the size of the box to write on it is very small, I need a more large box to write as Blob field " like work description ".

    How I can set default data on the BLOB field? or another way to make the box to write on the Text field larger?

    I wish you can help me!

  • Suggested answer
    YUN ZHU Profile Picture
    102,079 Super User 2026 Season 1 on at

    Hi, the initial value of the BLOB field can only be done using code. As for the method, you can refer to procedure SetWorkDescription in Sales Header.

    Hope this helps.

    Thanks.

    ZHU

  • Lama Khaled Profile Picture
    12 on at

    Thanks

    How I can use this method?

  • Verified answer
    YUN ZHU Profile Picture
    102,079 Super User 2026 Season 1 on at

    For example,

  • Lama Khaled Profile Picture
    12 on at

    Thanks so much for the best useful answer.

  • Lama Khaled Profile Picture
    12 on at

    How I can write more than one line in the Work Description text box by this trigger code?

    I have used this character to make a new line '' but it's not useful.

  • Suggested answer
    YUN ZHU Profile Picture
    102,079 Super User 2026 Season 1 on at

    Hi, very interesting question. Try the code below.

    tableextension 50111 MyExtension extends "Sales Header"
    {
        trigger OnInsert()
        var
            TypeHelper: Codeunit "Type Helper";
            Crlf: Text[2];
            String: Text[2048];
            OutS: OutStream;
        begin
            Crlf := TypeHelper.CRLFSeparator();
            String := 'This is line 1'   Crlf   'This is line 2'   Crlf   'This is line 3';
            Clear("Work Description");
            "Work Description".CreateOutStream(OutS, TextEncoding::UTF8);
            //OutS.WriteText(textstring);
            OutS.Write(String);
        end;
    }

  • Lama Khaled Profile Picture
    12 on at

    Perfect, Thanks a lot.

  • Suggested answer
    abhaq5000 Profile Picture
    15 on at

    YUN ZHU

    very good

    Good Job Man

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,713 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,032 Super User 2026 Season 1

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 914 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans