- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2016 05:08 PM
I'm getting a blank icon as an avatar in my "custom portal". No initials, no photo. In the admin area of ServiceNow it shows as expected, just not in service portal top menu.
It works in the "[instance].service-now.com/sp" portal fine too. So it seems that there's code somewhere that needs to be called in, into this new custom portal.
<sn-avatar class="avatar-small-medium" primary="userID" />
And where is the code/widget above stored for this so it can be debugged? As it also calls this method "avatarType()", where is this being set?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2016 06:18 PM
Update: Found out that the attribute value must be set in the controller, which was missing.
[View]
<sn-avatar class="avatar-small-medium" primary="userID" />
[Controller]
$scope.userID = $scope.user.sys_id;
The naming convention for variables being passed into the view, differs from the model, and how that attribute "primary" is written as a string was overlooked as a $scope variable declared in the controller.
The mystery of "out of the box" widgets and what happens within them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2016 06:18 PM
Update: Found out that the attribute value must be set in the controller, which was missing.
[View]
<sn-avatar class="avatar-small-medium" primary="userID" />
[Controller]
$scope.userID = $scope.user.sys_id;
The naming convention for variables being passed into the view, differs from the model, and how that attribute "primary" is written as a string was overlooked as a $scope variable declared in the controller.
The mystery of "out of the box" widgets and what happens within them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2017 02:23 PM
Hi, have observed something, if a user is created with first last name and later the names are changed, the system does not seems to display the correct Initials in the ServicePortal. The Backed seems to be fine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2017 07:12 AM
That is likely because the profile is duplicated into `live_profile`. The user avatar seems to be generated based on the name in `live_profile`, so it should be updated when `sys_user` is.