Quantcast
Channel: Microsoft Dynamics 365 Community
Viewing all articles
Browse latest Browse all 10657

Current user and its employee Name

$
0
0

Today I got small requirement where I have to pick and display current log in user Name, Following code snippet helps me

static void curUserInfo(Args _arg)
{
    str sUserId;
Name = name;
    ;
    sUserId = curUserId();
    info( "Current user ID is " + sUserId );
name= HcmWorker::find(DirPersonuser::findUserWorkerReference(sUserId)).name();
info ("Name is " + name);
}

Viewing all articles
Browse latest Browse all 10657

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>