server script to retrieve Country information

Frank70
ServiceNow Employee

In order to get user information to be displayed in the header of a portal, you can use the glidesystem user object:

eg. gs.getUser().getFirstName;

This works fine if the field contains a value.  However if the field is a reference, then the gs doesn't return a value :

eg. gs.getUser().getLocation;  doesn't return the value of the location of the logged on user.

Is there a way to get the value from a reference field ?