Current User Display Name
Posted: 10 Aug 2016
How do you get the current users Display name?
Thanks
Stuart
Thanks
Stuart
Design SharePoint forms with tabs, complex tables, accordions, sub-lists, and 3rd party columns
https://spform.com/forum/
Code: Select all
SP.SOD.executeOrDelayUntilScriptLoaded((function () {
var ctx = new SP.ClientContext.get_current();
var web = ctx.get_web();
ctx.load(web);
var user = web.get_currentUser();
user.retrieve();
ctx.executeQueryAsync(
function () {
alert(user.get_title());
});
}), "SP.js");