R13 – Get Username Displayed Again

Posted on Updated on

One of the things that we lost when we moved from R12 to R13 is the username in the top right corner. For end-users in production it doesn’t really matter as they’ll only be logging in as themselves, however during the implementation in Test we frequently log-in as different personas so it’s useful to see who the user is for your current session.

username

The initials we have in R13 offer a clue, but in non-Production pods it’d be nice to be able to see the full username. Luckily, there’s a tiny tweak that you can make to allow this.

Part of the idea came from this ERP Web Tutor video that shared the idea of putting static text in the global region/header bar:

ERPWebTutor

We’re going to take it a step further though, by including dynamic content instead of static text. The steps are as follows:

  1. Create yourself a fresh Sandbox and activate it
  2. From the Settings and Actions menu, select Customize Global Page Template
  3. Click in the centre of the Global Region and add an HTML Markup component (it needs to be HTML, not plain text, so we can style it appropriately)
  4. Click Close to exit, then click Customize Pages
  5. Edit the HTML Markup and use the following in the Value field:
    <p style="font-size: 18px; -webkit-margin-before: 10px; -webkit-margin-after: 0px;">
      <span style="color: rgba(255, 255, 255, 0.5);">
        User:&nbsp;
      </span>
      #{webCenterProfile[securityContext.userName].displayName} 
      <span style="color: rgba(255, 255, 255, 0.5);">
        &nbsp;&nbsp;&nbsp;Pod:&nbsp;
      </span>
      TEST
    </p>
  6. Click Close and test your change.

It should look like this:

final version

Notes:

  1. If your global region has a pale background you’ll need to tweak the colours/transparency so the text appears clearly.
  2. You’ll notice from the above HTML snippet that the username is dynamic and the pod is hard-coded. I’ve not yet found a way of bringing the pod alias in dynamically.
  3. I had to tweak the position of the HTML Markup component once as it was pushing the icons to the right past the edge of the screen. If you’re having problems place it inside the dark blue box in this picture, not the light blue one.

positioning

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s