I'm doing define([‘N/runtime’], var userId = run...
# suitescript
s
I'm doing define([‘N/runtime’], var userId = runtime.getCurrentUser().id; but it return -4 my userid is 1042 What am I doing wrong ?
b
-4 is system, which implies your script is not running using your user
this 1
k
Have you tried? userId.id
Are you talking about role with 1042. My role is 1047 so if you want that number you should do userid.role