Skip to main content

Notifications

Small and medium business | Business Central, N...
Answered

Show Full Name of User in Line instead of ID

Posted on by 295

I tried to show Full Name of User in General Journal line but it only shows ID

 addafter("PR Approval Status")
        {

            field(SystemCreatedBy; Rec.SystemCreatedBy)
            {

                ApplicationArea = all;
                ToolTip = 'Created by';
                Editable = false;

            }

        }
pastedimage1675738249926v1.png
How to link with User table and show Full name for each line
Thanks
  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: Show Full Name of User in Line instead of ID

    Great.

  • Hoang Ng Profile Picture
    Hoang Ng 295 on at
    RE: Show Full Name of User in Line instead of ID

    Thank Nitin

    Your code is correct. It can show Full Name of User

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: Show Full Name of User in Line instead of ID

    Hi,

    yes, it will show you always ID if you do like this, Do as per below

    trigger OnAfterGetRecord()
        var
            User: Record User;
        begin
            if User.Get(rec.SystemCreatedBy) then
                userFullName := user."Full Name";

        end;
    addafter("PR Approval Status")
    {
    field(Userfullname;userfullname)
    {

    ApplicationArea = all;
    ToolTip = 'Created by';
    Editable = false;

    }

    }

    you can use userfullName Global varilable as Text , and show it on page.

    Thanks.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans