0 Replies Latest reply on Nov 11, 2019 6:55 AM by 3438823

    How to get user role name using groovy


      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?



      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)