Join Slack
Powered by
I'm doing define([‘N/runtime’], var userId = run...
# suitescript
s
Simon
07/19/2023, 2:51 PM
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
battk
07/19/2023, 2:57 PM
-4 is system, which implies your script is not running using your user
this
1
k
Kevin Baxter
07/19/2023, 4:30 PM
Have you tried? userId.id
Kevin Baxter
07/19/2023, 4:32 PM
Are you talking about role with 1042. My role is 1047 so if you want that number you should do userid.role
10
Views
Open in Slack
Previous
Next