Show Custom Links user based

Posted by mysteryminds on 19-Jan-2016 09:18

I have a text block - We are currently showing some links in there 

I would like to show those based on the USER / USER GROUP

e.g: If the userrole is Manager = It will show  Yahoo.com
If the userrole is Team Lead = It will show Google.com

If the user role is Directore = it will show  Google.com  | Yahoo.com | MSN.com

I need it in a script manner

So that I can create custom script to display some text based on text format

All Replies

Posted by jsniemi79 on 19-Jan-2016 09:24

You can access the current user's role from anywhere through the script using the token '{!#CURR_USER.role#code}'.

That should help you condition your display of the links.  If you share your code I can put something together for you.

Posted by Aede Hoekstra on 20-Jan-2016 02:14

You can also use a formula field to display a certain text / link.

Would be something like this:

if("{!dossier#value}" == "") {

 return '<span style="color: red;">No Dossier</span>';

}

return '<a href="www.google.com">Google</a>'

This thread is closed