Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Unable to get SystemUser FullName in LINQ

(0) ShareShare
ReportReport
Posted on by 30

Hi,

 I am unable to get the FullName,FirstName, LastName or YomiFullName of a SystemUser using LINQ query in plugin. All these have values in the SystemUserBase table.Below is the code

var createdList= from u1 in orgContext.SystemUserSet
where u1.Id == postAppt.CreatedBy.Id
select new
{
YomiFullName = u1.FullName,
FirstName = u1.FirstName,
LastName = u1.LastName,
InternalEMailAddress = u1.InternalEMailAddress
};
foreach (var cUser in createdList)
{
createdByUser = cUser.YomiFullName;
localContext.TracingService.Trace("cUser " + cUser.FullName+ " " + cUser.InternalEMailAddress + " " + cUser.LastName);
break;
}

Note : I am getting the value for InternalEMailAddress. 

  • Suggested answer
    Guido Preite Profile Picture
    54,077 Moderator on at
    RE: Unable to get SystemUser FullName in LINQ

    maybe the problem is with this line

    YomiFullName = u1.FullName,

    you are assigning to YomiFullName field, try to assign to FullName as

    FullName = u1.FullName,

  • Vignaesh Ram Profile Picture
    30 on at
    RE: Unable to get SystemUser FullName in LINQ

    Hi,

    I checked the tracelogs, the user has value for FullName, FirstName & LastName. Is there any other way to get User Fullname?  Basically I need to get the Created by Name for an Appointment record

  • Kokulan Profile Picture
    18,054 on at
    RE: Unable to get SystemUser FullName in LINQ

    I would first make sure the user record has these values set.  You could include the user record GUID in your trace line and copy the GUID and open that user record in the UI and see if the user has FN, LN and Full Name set.

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

Announcing the Engage with the Community forum!

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 225 Super User 2025 Season 1

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 106 Most Valuable Professional

#3
Eugen Podkorytov Profile Picture

Eugen Podkorytov 95

Overall leaderboard

Product updates

Dynamics 365 release plans