NavWithNav

The premier knowledge-sharing hub for Microsoft Dynamics 365 Business Central developers, architects, and ERP professionals.

Back to Series
Business Central

Securely Retrieve User's Card Details Using USERSECURITYID in Business Central with AL Code.

<h1 style="text-align: center;">We can get the user's card details with the help of USERSECURITYID field in the Business central OnPrem and Saas version</h1> <h2>USERSECURITYID  - The ID that is assi...

NitinMay 29, 2023 1 min read
BusinessCentralExcelimporterALCodeEmailFileContentTriggerImageTechnicalMicrosoftDyanmicsNewImprovementsnewfeaturenavwithnavCommandsUserFullNameVSCodeUserCardUSERSECURITYID

We can get the user's card details with the help of USERSECURITYID field in the Business central OnPrem and Saas version

USERSECURITYID  - The ID that is assigned to the user by the application. This is the value of the User Security ID field in table 2000000120, the User table, for the current user.

Learn more from here Below is the code you can use to get the details for current user logged in BC
var
    User: Record User;
begin
    User.get(UserSecurityId());
    message('Full Name:%1..Email ID:%2', user."Full Name", User."Contact Email");
end;
We have to standard BC table USER with table id 2000000120 Thanks for visiting my blog.
0
0

Discussion (0)

Leave a comment

No comments yet. Be the first to share your thoughts!