Hunter Jacobs
10/19/2022, 2:37 PM/**
*@NApiVersion 2.1
*@NScriptType UserEventScript
*/
define ( ['N/record', 'N/ui/serverWidget'] ,
function(record, serverWidget) {
function myBeforeSubmit(context) {
if (context.type !== context.UserEventType.CREATE)
return;
var newEmployeeRecord = context.newRecord;
newEmployeeRecord.setValue({
fieldId: 'message',
value: 'Orientation date TBD.'
});
}
return {
beforeSubmit: myBeforeSubmit
};
});
JessicaL
10/19/2022, 2:47 PMHunter Jacobs
10/19/2022, 2:49 PMJessicaL
10/19/2022, 2:50 PMJessicaL
10/19/2022, 2:52 PMHunter Jacobs
10/19/2022, 2:54 PMHunter Jacobs
10/19/2022, 2:54 PMHunter Jacobs
10/19/2022, 2:54 PMJessicaL
10/19/2022, 2:57 PMHunter Jacobs
10/19/2022, 2:59 PMHunter Jacobs
10/19/2022, 3:00 PMJessicaL
10/19/2022, 3:11 PMHunter Jacobs
10/19/2022, 3:45 PM/**
*@NApiVersion 2.1
*@NScriptType UserEventScript
*/
// Load two standard modules.
define ( ['N/record', 'N/ui/serverWidget'] ,
// Add the callback function.
function(record, serverWidget) {
// In the beforeSubmit function, add test to the Notes field.
function myBeforeSubmit(context) {
//if (context.type !== context.UserEventType.CREATE)
//return;
//var newEmployeeRecord = context.newRecord;
//newEmployeeRecord.setValue({
//fieldId: 'message',
//value: 'Orientation date TBD.'
//});
}
// Add the return statement that identifies the entry point funtions.
return {
beforeSubmit: myBeforeSubmit
};
});
Hunter Jacobs
10/19/2022, 3:47 PMJessicaL
10/19/2022, 3:59 PMHunter Jacobs
10/20/2022, 3:32 PMJessicaL
10/20/2022, 3:33 PM