You can use the following system variables in a code block in order to get data. This are reserved variables so, you can not declare variables with the same name:
- _JNUURL_ : gets the current Jhanu Url (ex. https://jhanu.fdcapps.com/)
- _JNUSITE_ : gets the current site/domain (ex. jhanu.fdcapps.com)
- _JNUUSERID_ : gets the current user Id
- _JNUUSERROLE_ : gets the current user role (ex. ADMIN)
- _JNUUSEREMAIL_ : gets the current user email (username) (ex. felipediazc@myemail.com)
- _JNUUSERNAME_ : gets the current user name (ex. Felipe Díaz)
- lang : gets the current user lang (en/es) or default (en) if there is no user logged in the service call
- outJson : this is the JSON object that the service uses to return data
- request : the
HttpServletRequest
object used in the service - httpresponse : the
HttpServletResponse
object used in the service - log : this is the log object used in the service
- fileAccess :
RestrictedAccess
object which validates the limitations on this service execution - os :
OutputStream
object used to return HTML and PDF data (anything different than a JSON response)