// If you find yourself doing something like this...
function fieldChanged(type, name, index) {
if (name == 'salesrep') {
var salesRepId = nlapiGetFieldValue('salesrep');
var salesRepEmail = nlapiLookupField('employee', salesRepId, 'email');
nlapiSetFieldValue('custb...