- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2019 05:18 AM
Hi all,
With regrads to the activity stream @mentions notification. Is there a way to either:
- Lock it down to internal users only. (i've managed to do this so a notification isn't sent to an external client but they're still selecteable in the user filter. See below image).
- Filter the selectable users in the @mention picklist.
- Identify based on the company in the @mention picklist, this way we can differentiate which user to tag.
The current issue I'm facing is we have an internal user and external user with eactly the same name. e.g. Joe Bloggs
When you @Joe Bloggs there isn't a distinctive way of telling the two users apart in the filter.
Any help is greatly appreciated.
Thanks,
Mike
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2019 08:33 AM
If you are looking to change the display of the results (adding Company or Department) you will navigate need to edit the Dictionary entry for "Name" under the sys_user table. Please Note: This will change the display for more than just the mentions results. It's using (aka: Name that appears in comments, name that appears at top right of logged in user, etc)
It is currently scripted to display First name + Last Name. You can add additional fields there.
Sample from my demo instance that displays as Abel Tuter (Product Management):
if (current.first_name.nil() && current.last_name.nil() && !current.name.nil()) {
var names = current.name.toString().split(" ");
if (names.length > 1) {
current.first_name = names[0];
names.shift();
current.last_name = names.join(" ");
} else
current.last_name = names[0];
}
if(current.first_name.nil()) {
current.last_name + ' (' + current.department.getDisplayValue() + ')';
} else {
current.first_name + ' ' + current.last_name + ' (' + current.department.getDisplayValue() + ')';
}
Please Note, I didn't add a check to ensure the new display field (in this example "Department") is not empty. You may want to add this so you don't end up with First Last ()

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2019 07:22 AM
Please see solution below
Regards,
Sachin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2019 08:33 AM
If you are looking to change the display of the results (adding Company or Department) you will navigate need to edit the Dictionary entry for "Name" under the sys_user table. Please Note: This will change the display for more than just the mentions results. It's using (aka: Name that appears in comments, name that appears at top right of logged in user, etc)
It is currently scripted to display First name + Last Name. You can add additional fields there.
Sample from my demo instance that displays as Abel Tuter (Product Management):
if (current.first_name.nil() && current.last_name.nil() && !current.name.nil()) {
var names = current.name.toString().split(" ");
if (names.length > 1) {
current.first_name = names[0];
names.shift();
current.last_name = names.join(" ");
} else
current.last_name = names[0];
}
if(current.first_name.nil()) {
current.last_name + ' (' + current.department.getDisplayValue() + ')';
} else {
current.first_name + ' ' + current.last_name + ' (' + current.department.getDisplayValue() + ')';
}
Please Note, I didn't add a check to ensure the new display field (in this example "Department") is not empty. You may want to add this so you don't end up with First Last ()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2020 02:02 PM
Very helpful!