Skip to main content
Solved

Get Current User's Name and Role in Customer Portal

  • 22 April 2021
  • 1 reply
  • 997 views

I'm working on customizing the landing page in our company's Customer Portal by using a Wiki page, and I need to modify the displayed HTML elements of this page based on the current user's role, as well as write the user's name into one of the HTML elements.

What I'm trying to find is a way to make a call when the customer portal home page loads, to any already existing functions that would return the name and role of the current user, so that my javascript code can modify the HTML accordingly, or any other way to get this information and have it available in the backend when the user logs in.

I’ve found that these codes apparently return the user’s ID and Name, in some aspx files in the Acumatica source code, but I haven’t found a way to use them in the portal’s home page, if it’s possible:

PXAccess.GetUserID()

Current<AccessInfo.userID>
Current<AccessInfo.userName>

 

Thanks in advance for your help!

Best answer by Gabriel Michaud

Wiki pages don’t allow for conditional logic, unfortunately. Your best bet would be to have a different set of wiki pages, and to set the default page and access rights in such a way that you deliver the content you need for these users.

View original
Did this topic help you find an answer to your question?

1 reply

Gabriel Michaud
Captain II
Forum|alt.badge.img+10

Wiki pages don’t allow for conditional logic, unfortunately. Your best bet would be to have a different set of wiki pages, and to set the default page and access rights in such a way that you deliver the content you need for these users.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings