Register today for Oracle CloudWorld. October 17th - 20th, Las Vegas

Register now

Hillel Cooperman, Senior VP of User Experience Design, has a message for you on Oracle CloudWorld

Watch now
Groovy - Unsupported methods .getOrganization() — Cloud Customer Connect
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
1
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!