This message was deleted.
# suitescript
s
This message was deleted.
1
s
runtime.getCurrentUser() will return you the user object, meaning you can do this to the object:
if what you want to do is log what you achieved, you need to do a JSON.stringify whilst you set value of your userObj
Copy code
define(['N/record','N/runtime'], function (record,runtime) {
/**
 *@NApiVersion 2.x
 *@NScriptType UserEventScript
 *@NModuleScope Public
 */
 var userObj = runtime.getCurrentUser();
 function beforeLoad(context) {
    if (context.type !== context.UserEventType.COPY)
         return;
         var SalesOrderRecord = context.newRecord;
		 log.debug('userObj',JSON.stringify(userObj));
         SalesOrderRecord.setValue('memo', JSON.stringify(userObj));
     }
     return {
         beforeLoad: beforeLoad
     }
});
^like this