Display different label for columns in list view for internal and external users

theBeastMaster
Mega Guru

Is it possible to display different labels for columns in the list view for internal and external users in the portal?

for eg: for internal users, 'Name' should display the same as it is at table level

but for external users 'Name' should appear as 'Customer Name'

4 REPLIES 4

anurag92
Kilo Sage

Hey theUltimateWinner (Kudos on the name),

 

You can use a client script which checks if the user is internal or external (using GlideAjax or if async getReference). Pseudoscript would look like this:

 

var internal;

internal = true/false;//logic to set internal as true if user is internal

if(!internal)

{

g_form.setLabelOf('original_field',"Customer Name'');

}

 

 

This should work nicely 😉

theBeastMaster
Mega Guru
Hi Anurag, Thank you for your response. Code shared by you probably will work at form level. I am looking for the same to work at list layout as well. Thanks

anurag92
Kilo Sage

It can work at list level too, if you write this in a UI script that runs on the list view for this table. Which will be complex to achieve and not recommended from architectural perspective.

But if you wanna do it anyway, use UI script.

DrewW
Mega Sage
Mega Sage

There is not going to be any good way to do this in the platform UI.  Your best bet is going to be to have external users use a Service Portal that way you can completely control things, but it will take more dev time.