tag user in message

Hello, How can I Tag another user in a text? example: hello @Steven, can you look at this problem?   @steven should get a message    Kind regards, Steven Keersmaekers
2 answers

Firstly you’d need to look at extracting users from the text. This looks like a regular expression, starting with @ and continuing to the first non username permitted character (e.g. a space character).

Once you have this, you can search System.User for a someone with a matching Name attribute (beware of case sensitivity).

Once you have that, you should be able to create a Message object and link it to your User (assuming that is how you are planning on sending messages). Make sure your Message object has sensible security so one user can create and the other can read.

Hope this helps.


Hi! Any luck with that? :) I am hoping to do the same!