Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Get User-Information out of SID

Posted on by Microsoft Employee

I'm using the relatively new fields SystemCreatedBy and SystemModifiedBy, but I do not want to display the ID but the users-name instead - can it be linked directly to the user's table (which would be which?).

Thanks!

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Get User-Information out of SID

    Sorry -I'm simply trying to display the values of these fields (like here) on a page; for the datetime-fields the display-value is fine, for the SystemCreatedBy/SystemModifiedBy (which are SID's) I want to display the corresponding user's full-name (as stored in table user).

    For now I have this peace of code:

        procedure GetFullName(userID: Guid)Text
        var
            UserInfo: Record User;
        begin
            if not UserInfo.Get(userIDthen
                exit('');
            exit(UserInfo."Full Name");
        end;
    That is called by
       field("appSystemCreatedBy"; GetFullName(Rec.SystemCreatedBy))
       {
          ApplicationArea = All;
       }
    But there is no value displayed (even on newly created records).
  • Suggested answer
    vishal bagadia_crm Profile Picture
    vishal bagadia_crm 490 on at
    RE: Get User-Information out of SID

    Can you please explain your requirement in bit detail.

    If you access those fields in Front end. You will see a lookup of the user/team entity with name.

    In the backend when you will retrieve these value in coding, you will get this value as EntityReference under which you can get 3 details.. 1. entityName 2. RecordId..3. Name.. based on the 3rd value you can identitfy the name.

    If the 3rd value is empty in EntityReference. Then you need to make an extra service call to retrieve the desired data by using the RecordId and entity name.

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,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans