You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Groovy - Unsupported methods .getOrganization()

Received Response
11
Views
1
Comments

Summary:

I'm trying to return the current users Organization for some logic on a page layout. However using the script below it returns null in the logs and when assigning it to a plain text box (just to test). My profile is set up with an organizaztion unit also.

def currentUser = adf.context.getSecurityContext()?.getUserProfile()?.getOrganization()

println("Current user: " + currentUser)

Is the organization method unsupported, or can it be returned another way?

I have also tried '.getOrganizationalUnit()' but with the same result.

Thank you.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!