Published: 3/25/2026 Set the user name from the user email address APEX JavaScript How to set the user name from the user email address Example:function initCap(str){ return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase(); } var email = $v('P1_EMAIL'); if (email) { var local = email.split('@')[0]; var name = local.split('.') .map(initCap) .join(' '); apex.item('P1_NAME') .setValue(name) }