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

How to find current user role name using groovy script in Order Management Extensions

edited Nov 11, 2019 7:10AM in Order Management 3 comments

Summary

How to find current user role name using groovy script in Order Management Extensions

Content

Hello All,

 

I'm trying to fetch the current user role in Order Management extensions (on Save Button) using groovy script so that I can perform specific set of actions. I tried below code but getting error. Can anyone pleasehelp me on this?

 

Code:

def secCtx = adf.context.getSecurityContext()

if (secCtx.isUserInRole('Order Manager')) {

return true

}

else {

  return false

}

 

Error: oracle.jbo.JboException: JBO-29000: Unexpected exception caught: groovy.lang.MissingPropertyException, msg=No such property: adf for class: ExID300000196161920__19. (DOO-2685874)

Version

19C (11.13.19.07.0)

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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