How to change the avatar display on header menu in service portal.

Sumit35
Tera Contributor

Hi All,

 

Currently when there is no picture added to user profile, avatar is displayed based on first letter of first name and last name as below.

find_real_file.png

 

I have created one custom field called "preferred name", Preferred name is not same as first name.

I want to display the avatar based on first letter of preferred name and last name.

Please help me..!

 

Regards,

Sumit Jumale

3 REPLIES 3

Prins Kumar Gup
Giga Guru
Hi Sumit,
 
Go to the Header&Footer under the service portal application and search the stock header, that clone this stock header and open in widget editor. Please make changes in the client controller section:
 
 
Client Controller: Line Number: 3 to 7
 
$scope.avatarProfile = {
userID: $scope.user.sys_id,
name: $scope.user.name,
initials: $window.NOW.user_initials
};

Thanks.

PKG

Prins Kumar Gup
Giga Guru

Please see the below link. I believe it's helpful for you:

serviceportal avatar

Rahul Kumar17
Tera Guru

hi 

https://community.servicenow.com/community?id=community_question&sys_id=1ecfcf65dbdcdbc01dcaf3231f961929

If my response helped please mark it correct and close the thread.

Thanks,
Rahul Kumar