Display user profile information
This sample is a client script that displays user profile information.
The conversion of this script from SuiteScript 1.0 to SuiteScript 2.1 includes the following:
-
JSDoc tags are added at the top of the script to indicate the script version and script type.
-
The
definestatement is added which imports the N/runtime and N/ui/message modules. -
The
returnstatement is added with thepageInitentry point. -
The
nlapiGetUserfunction is changed to theruntime.getCurrentUsermethod and theruntime.User.nameproperty. -
The
nlapiGetRolefunction is changed to theruntime.User.roleproperty. -
The
nlapiGetDepartmentfunction is changed to theruntime.User.departmentproperty. -
The
nlapiGetLocationfunction is changed to theruntime.User.locationproperty. -
The
alertfunction is changed to themessage.createandmessage.showfunctions.
|
SuiteScript 1.0 Script |
SuiteScript 2.1 Script |
|---|---|
|
|