How to get current user detail

Hi All,
Question is it possible to get the current user detail in userevent (suitescript 2.x)?
I tried this API

context.getRole();

context.getUser()

but I received an error “getRole() and getUser() is not function”

thank you for your response

Rookie Asked on December 29, 2021 in SuiteScript.
Add Comment
2 Answer(s)
Best answer
Hi,
look at these lines of code
define([‘N/runtime’],
   var userId = runtime.getCurrentUser().id;
Rookie Answered on January 21, 2022.
Add Comment
Advanced Answered on December 29, 2021.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Limebox   Become a Sponsor   Become a Sponsor