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

Notifications

Announcements

No record found.

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. 

I have the same question (0)
  • Kokulan Profile Picture
    18,054 on at

    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.

  • Vignaesh Ram Profile Picture
    30 on at

    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

  • Suggested answer
    Guido Preite Profile Picture
    54,086 Moderator on at

    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,

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 70 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 33 Most Valuable Professional

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans