- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2016 01:39 AM
Hi guys how can we add the current user's name to the "How Can We Help?" message on the main SP page? Please refer to attached screenshot. Thanks - Regina
Solved! Go to Solution.
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2016 05:04 AM
For the newly cloned widget...
Just write the below line in the Server part:
data.user = gs.getUserName();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2016 03:37 AM
What is your server script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2016 03:39 AM
var typeAheadSearchOpts = {title: gs.getMessage('How can we help?'), size: 'lg', color: 'default'};
data.typeAheadSearch = $sp.getWidget('typeahead-search', typeAheadSearchOpts);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2016 03:42 AM
Try
(function() {
// Collect the User Info to Display Users First Name
data.sysUserID = gs.getUserID();
if (!data.sysUserID)
data.sysUserID = gs.getUser().getID();
var sysUserGR = new GlideRecord("sys_user");
data.userExists = sysUserGR.get(data.sysUserID);
if (data.userExists) {
data.name = sysUserGR.getValue("first_name");
} else {
data.name = "User";
}
// Include the Search Bar widget as part of this Widget
var typeAheadSearchOpts = {title: gs.getMessage('How can we help?'), size: 'lg', color: 'default'};
data.typeAheadSearch = $sp.getWidget('typeahead-search', typeAheadSearchOpts);
})();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2016 04:12 AM
Thanks Derek, no luck!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2016 05:03 AM
For the newly cloned widget...
Just write the below line in the Server part:
data.user = gs.getUserName();